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
Branches
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.
## Submodules
* 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
* The file `tests-only/.gitignore` prevents non-source-code files from being
accidentally committed to the repository.
* The file `development-environment-homework/.gitignore` prevents
non-source-code files from being accidentally committed to the repository.
* The file `tests-only/package.json` describes the project and its
dependencies. It can be edited to customize the inputs and processes used
in various software lifecyle tasks like linting, testing, or deploying.
* The file `development-environment-homework/package.json` describes the
project and its dependencies. It can be edited to customize the inputs and
processes used in various software lifecyle tasks like linting, testing, or
deploying.
* The file `tests-only/package-lock.json` records the exact set of
dependencies used to satisfy the requirements in `tests-only/package.json`.
It should not be hand-edited; use commands like `npm install` or `npm
uninstall` from the `tests-only` directory to make changes.
* The file `development-environment-homework/package-lock.json` records the
exact set of dependencies used to satisfy the requirements in
`development-environment-homework/package.json`. It should not be
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
`npm`.
* The folder `development-environment-homework/node_modules` contains the
dependencies installed by `npm`.
## Code Under Test
* The file `tests-only/src/helloWorld.js` is an example of a simple
implementation that can be unit tested.
* The file `development-environment-homework/src/helloWorld.js` is an example
of a simple implementation that can be unit tested.
## 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 @@
"devDependencies": {
"@unlcsce/eslint-config": "file:../eslint-config",
"eslint": "^8.20.0",
"jest": "^28.1.3",
"jest-environment-node": "^28.1.3"
"jest": "^29.6.2",
"jest-environment-node": "^29.6.2"
},
"eslintConfig": {
"extends": "@unlcsce"
......
export function helloWorld() {
return 'Hello, World!';
return [
'Hello,',
'World!',
];
}
import { helloWorld } from './helloWorld.js';
describe('the JavaScript language', () => {
test('performs addition correctly', () => {
expect(1 + 1).toBe(2);
});
});
describe('the hello-world function', () => {
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