Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added code for setting up WebApi with Express.js #15

Merged
merged 5 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"parserOptions": {
"ecmaVersion": 2023,
"sourceType": "module",
"project": "tsconfig.json"
"project": "./tsconfig.json"
},
"rules": {
"no-unused-vars": "off",
Expand Down
15 changes: 0 additions & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,6 @@
"internalConsoleOptions": "neverOpen",
"cwd": "${workspaceFolder}",
"sourceMaps": true
},
{
"name": "Jest current test",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--verbose",
"-i",
"--no-cache",
"--watchAll"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
4 changes: 1 addition & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,4 @@ One of the mentioned benefits is testing, which Emmett helps to do out of the bo

Tests for our Shopping Cart business logic can look like this:

<<< @/snippets/gettingStarted/businessLogic.unit.test.ts#getting-started-unit-tests

Above tests use [Jest testing library](https://jestjs.io/), but you can use it in any other testing package, as it's fully independent.
<<< @/snippets/gettingStarted/businessLogic.unit.spec.ts#getting-started-unit-tests
1 change: 1 addition & 0 deletions docs/snippets/gettingStarted/businessLogic.unit.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
import { describe, it } from 'node:test';
import { v4 as uuid } from 'uuid';
import { decide } from './businessLogic';
Expand Down
1 change: 1 addition & 0 deletions docs/snippets/gettingStarted/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type EmptyShoppingCart = {

export type OpenedShoppingCart = {
status: 'Opened';

productItems: ProductItems;
};

Expand Down
Loading