Skip to content
Snippets Groups Projects
Commit 55e3cd41 authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Updated dependencies and example code for 2023.

parent 8f5c4c03
No related branches found
No related tags found
No related merge requests found
...@@ -35,30 +35,33 @@ The folders and files in the starter code are briefly described below. ...@@ -35,30 +35,33 @@ The folders and files in the starter code are briefly described below.
## Submodules ## Submodules
* The Git submodule `eslint-config` contains the ESLint configuration for the * The Git submodule `eslint-config` contains the ESLint configuration for the
coding style used in the `tests-only` project. coding style used in the `development-environment-homework` project.
## General Configuration ## General Configuration
* The file `tests-only/.gitignore` prevents non-source-code files from being * The file `development-environment-homework/.gitignore` prevents
accidentally committed to the repository. non-source-code files from being accidentally committed to the repository.
* The file `tests-only/package.json` describes the project and its * The file `development-environment-homework/package.json` describes the
dependencies. It can be edited to customize the inputs and processes used project and its dependencies. It can be edited to customize the inputs and
in various software lifecyle tasks like linting, testing, or deploying. processes used in various software lifecyle tasks like linting, testing, or
deploying.
* The file `tests-only/package-lock.json` records the exact set of * The file `development-environment-homework/package-lock.json` records the
dependencies used to satisfy the requirements in `tests-only/package.json`. exact set of dependencies used to satisfy the requirements in
It should not be hand-edited; use commands like `npm install` or `npm `development-environment-homework/package.json`. It should not be
uninstall` from the `tests-only` directory to make changes. hand-edited; use commands like `npm install` or `npm uninstall` from the
`development-environment-homework` directory to make changes.
* The folder `tests-only/node_modules` contains the dependencies installed by * The folder `development-environment-homework/node_modules` contains the
`npm`. dependencies installed by `npm`.
## Code Under Test ## Code Under Test
* The file `tests-only/src/helloWorld.js` is an example of a simple * The file `development-environment-homework/src/helloWorld.js` is an example
implementation that can be unit tested. of a simple implementation that can be unit tested.
## Test Code ## Test Code
* The file `tests-only/src/helloWorld.test.js` demonstrates a Jest unit test. * The file `development-environment-homework/src/helloWorld.test.js`
demonstrates a Jest unit test.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
"devDependencies": { "devDependencies": {
"@unlcsce/eslint-config": "file:../eslint-config", "@unlcsce/eslint-config": "file:../eslint-config",
"eslint": "^8.20.0", "eslint": "^8.20.0",
"jest": "^28.1.3", "jest": "^29.6.2",
"jest-environment-node": "^28.1.3" "jest-environment-node": "^29.6.2"
}, },
"eslintConfig": { "eslintConfig": {
"extends": "@unlcsce" "extends": "@unlcsce"
......
export function helloWorld() { export function helloWorld() {
return 'Hello, World!'; return [
'Hello,',
'World!',
];
} }
import { helloWorld } from './helloWorld.js'; import { helloWorld } from './helloWorld.js';
describe('the JavaScript language', () => {
test('performs addition correctly', () => {
expect(1 + 1).toBe(2);
});
});
describe('the hello-world function', () => { describe('the hello-world function', () => {
test('returns the correct string', () => { test('returns the correct string', () => {
expect(helloWorld()).toBe('Hello, World!'); expect(helloWorld()).toEqual([
'Hello,',
'World!',
]);
}); });
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment