Skip to content
Snippets Groups Projects
Commit 947c398c 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
# Homework 3
Starter code for Homework 3 in 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/homework-3.git
$ cd homework-3
```
(If you forget `--recursive` when cloning, you can `cd` into your clone and run
`git submodule update --init --recursive` instead.)
Install dependencies:
```
$ npm install
```
# Instructions
See <https://canvas.unl.edu/courses/136556/assignments/1358487> for Dr. Brady's students.
See <> for Dr. Vinod's students.
Subproject commit 16524f5ac58d4b13378261f1ab29bc1acc2a2099
{
"folders": [
{
"path": "."
}
],
"settings": {
"files.eol": "\n",
"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": "@unlcsce/homework-3",
"version": "1.0.0",
"description": "Starter code for Homework 3.",
"type": "module",
"private": true,
"license": "UNLICENSED",
"scripts": {
"lint:js": "eslint --max-warnings 0 ./src",
"lint": "run-s --continue-on-error lint:**",
"test-once:currency:small": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage -t \"\\`planTrades\\` function on small inputs\"",
"test-once:currency:large": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage -t \"\\`planTrades\\` function on large inputs\"",
"test-once:currency": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage -t \"\\`planTrades\\` function\"",
"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": {
"@unlcsce/eslint-config": "file:../eslint-config",
"eslint": "^8.20.0",
"jest": "^28.1.3",
"jest-environment-node": "^28.1.3"
},
"eslintConfig": {
"extends": "@unlcsce"
},
"jest": {
"clearMocks": true,
"collectCoverageFrom": [
"src/**/*.js",
"!src/testing/**/*.js",
"!src/vocabulary.js",
"!src/collections.js",
"!src/arrayAccessObservation.js"
],
"resetMocks": false,
"restoreMocks": false,
"setupFilesAfterEnv": [
"./src/setupTests.js"
],
"testEnvironment": "./src/testing/failFast.js",
"transform": {}
},
"//": [
"See https://github.com/facebook/jest/issues/9430 for information on Jest+ES6."
]
}
export function planTrades(values, commission) {
return []; // Implement this function per the assignment instructions.
}
This diff is collapsed.
import { jest } from '@jest/globals';
// This is included for consistency with `create-react-app`. It may be become
// unnecessary in future versions of Jest (see
// https://github.com/facebook/jest/issues/9430#issuecomment-616232029), but
// Jest may also choose to move away from magic globals and use imports instead,
// which are already opt-in (see https://github.com/facebook/jest/issues/4473).
globalThis.jest = jest;
import jestEnvironmentNode from 'jest-environment-node';
export default class FailFastEnvironment extends jestEnvironmentNode.default {
constructor(...rest) {
super(...rest);
this.failed = false;
}
async handleTestEvent(event, state) {
switch (event.name) {
case 'hook_failure':
case 'test_fn_failure':
this.failed = true;
break;
case 'test_start':
if (this.failed) {
event.test.mode = 'skip';
}
break;
default:
}
if (super.handleTestEvent !== undefined) {
await super.handleTestEvent(event, state);
}
}
}
This diff is collapsed.
{
"name": "@unlcsce/homework-3",
"version": "1.0.0",
"description": "Starter code for Homework 3.",
"private": true,
"license": "UNLICENSED",
"scripts": {
"postinstall:eslint-config": "cd eslint-config && npm install",
"postinstall:app": "cd homework-3 && npm install",
"postinstall": "run-s postinstall:**",
"lint:app": "cd homework-3 && npm run lint",
"lint": "run-s --continue-on-error lint:**",
"test-once:currency:small": "cd homework-3 && npm run test-once:currency:small",
"test-once:currency:large": "cd homework-3 && npm run test-once:currency:large",
"test-once:currency": "cd homework-3 && npm run test-once:currency",
"test-once": "cd homework-3 && npm run 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