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

Initial commit.

parents
No related branches found
No related tags found
No related merge requests found
# Disable line-ending conversions for this repository.
* -text
# dependencies
/node_modules
# testing
/coverage
# production
/build
# environments
.env.local
.env.development.local
.env.test.local
.env.production.local
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# misc
*~
.DS_Store
[submodule "eslint-config"]
path = eslint-config
url = git@git.unl.edu:csce-310/eslint-config.git
# Development Environment Homework Starter Code
A minimal project used to check that everyone's development environment is set
up for the 250 section of the CSCE 310 course at UNL.
# Quick Start
Recursively clone this repository and `cd` into the root folder:
```
$ git clone --recursive git@git.unl.edu:csce-310/development-environment-homework.git
$ cd development-environment-homework
```
(If you forget `--recursive` when cloning, you can `cd` into your clone and run
`git submodule update --init --recursive` instead.)
Install dependencies:
```
$ npm install
```
Optionally run the linter and the test suite:
```
$ npm run lint
$ npm run test
```
# Folders and Files
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.
## General Configuration
* The file `tests-only/.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 `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 folder `tests-only/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.
## Test Code
* The file `tests-only/src/helloWorld.test.js` demonstrates a Jest unit test.
{
"folders": [
{
"path": "."
}
],
"settings": {
"files.eol": "LF",
"files.exclude": {
"**/node_modules": true
},
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true
}
}
# dependencies
/node_modules
# testing
/coverage
# production
/build
# environments
.env.local
.env.development.local
.env.test.local
.env.production.local
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# misc
*~
.DS_Store
This diff is collapsed.
{
"name": "@unlsoft/development-environment-homework",
"version": "1.0.0",
"description": "A minimal project used to check students' development environments.",
"type": "module",
"private": true,
"license": "UNLICENSED",
"scripts": {
"lint:js": "eslint --max-warnings 0 ./src",
"lint": "run-s --continue-on-error lint:**",
"test-once": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watchAll --coverage"
},
"dependencies": {
"npm-run-all": "^4.1.5"
},
"devDependencies": {
"@unlsoft/eslint-config": "file:../eslint-config",
"eslint": "^7.30.0",
"jest": "^27.0.6",
"jest-environment-node": "^27.0.6"
},
"eslintConfig": {
"extends": "@unlsoft"
},
"jest": {
"clearMocks": true,
"collectCoverageFrom": [
"src/**/*.js"
],
"resetMocks": false,
"restoreMocks": false,
"testEnvironment": "jest-environment-node",
"transform": {}
},
"//": [
"See https://github.com/facebook/jest/issues/9430 for information on Jest+ES6."
]
}
export function helloWorld() {
return 'Hello, World!';
}
import { helloWorld } from './helloWorld.js';
describe('the hello-world function', () => {
test('returns the correct string', () => {
expect(helloWorld()).toBe('Hello, World!');
});
});
Subproject commit 24df42fb655d234b83c93b0fb24d012e4d9ecb58
This diff is collapsed.
{
"name": "@unlsoft/development-environment-homework",
"version": "1.0.0",
"description": "A minimal project used to check students' development environments.",
"private": true,
"license": "UNLICENSED",
"scripts": {
"postinstall:eslint-config": "cd eslint-config && npm install",
"postinstall:app": "cd development-environment-homework && npm install",
"postinstall": "run-s postinstall:**",
"lint:app": "cd development-environment-homework && npm run lint",
"lint": "run-s --continue-on-error lint:**",
"test-once:app": "cd development-environment-homework && npm run test-once",
"test-once": "run-s --continue-on-error test-once:**",
"test": "run-s test-once"
},
"devDependencies": {
"ghooks": "^2.0.4",
"npm-run-all": "^4.1.5"
},
"config": {
"ghooks": {
"pre-commit": "npm run lint"
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment