Skip to content

Commit 651b124

Browse files
committed
Convert to jest.
1 parent c68287e commit 651b124

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+16871
-8892
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"name": "Exceptionless.JavaScript",
33
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:latest",
44
"extensions": [
5+
"andys8.jest-snippets",
56
"dbaeumer.vscode-eslint",
6-
"hbenl.vscode-mocha-test-adapter",
7+
"esbenp.prettier-vscode",
8+
"firsttris.vscode-jest-runner",
79
"hbenl.vscode-test-explorer",
810
"juancasanova.awesometypescriptproblemmatcher",
911
"ryanluker.vscode-coverage-gutters",

.eslintrc.js

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
11
module.exports = {
2-
"env": {
3-
"browser": true,
4-
"es6": true,
5-
"mocha": true,
6-
"node": true
7-
},
8-
"extends": [
9-
"eslint:recommended",
10-
"plugin:@typescript-eslint/recommended",
2+
env: {
3+
browser: true,
4+
es6: true,
5+
node: true
6+
},
7+
extends: [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
11+
],
12+
globals: {
13+
Atomics: "readonly",
14+
SharedArrayBuffer: "readonly"
15+
},
16+
parser: "@typescript-eslint/parser",
17+
parserOptions: {
18+
ecmaVersion: 2018,
19+
sourceType: "module",
20+
project: [
21+
"./tsconfig.json",
22+
"./packages/*/tsconfig.json",
1123
],
12-
"globals": {
13-
"Atomics": "readonly",
14-
"SharedArrayBuffer": "readonly"
15-
},
16-
"parser": "@typescript-eslint/parser",
17-
"parserOptions": {
18-
"ecmaVersion": 2018,
19-
"sourceType": "module"
20-
},
21-
"plugins": [
22-
"@typescript-eslint"
23-
],
24-
"ignorePatterns": [
25-
"node_modules",
26-
"dist"
27-
],
28-
"rules": {
29-
"@typescript-eslint/explicit-module-boundary-types": "off",
30-
"@typescript-eslint/no-empty-function": "off",
31-
"@typescript-eslint/no-explicit-any": "off",
32-
"@typescript-eslint/no-inferrable-types": "off"
33-
}
24+
tsconfigRootDir: __dirname,
25+
warnOnUnsupportedTypeScriptVersion: false,
26+
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
27+
},
28+
plugins: [
29+
"eslint-plugin",
30+
"@typescript-eslint",
31+
"jest",
32+
"import",
33+
"eslint-comments"
34+
],
35+
ignorePatterns: [
36+
"node_modules",
37+
],
38+
rules: {
39+
"@typescript-eslint/explicit-module-boundary-types": "off",
40+
"@typescript-eslint/no-empty-function": "off",
41+
"@typescript-eslint/no-explicit-any": "off",
42+
"@typescript-eslint/no-inferrable-types": "off"
43+
}
3444
};

.gitignore

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,10 @@
22
.idea
33
.git
44
node_modules
5-
jspm_packages
6-
public
7-
/dist/temp
8-
example/exceptionless.js
95
dist
6+
*.eslintcache
7+
*.tsbuildinfo
108

11-
packages/node/.eslintcache
12-
13-
packages/angularjs/.eslintcache
14-
15-
packages/browser/.eslintcache
16-
17-
packages/core/.eslintcache
18-
19-
packages/node-submit-sync/.eslintcache
9+
test-data
10+
packages/node/test-data
2011

21-
*.tsbuildinfo

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"recommendations": [
3+
"andys8.jest-snippets",
34
"dbaeumer.vscode-eslint",
45
"esbenp.prettier-vscode",
5-
"hbenl.vscode-mocha-test-adapter",
6+
"firsttris.vscode-jest-runner",
67
"hbenl.vscode-test-explorer",
78
"juancasanova.awesometypescriptproblemmatcher",
89
"ryanluker.vscode-coverage-gutters",

.vscode/launch.json

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,34 @@
44
{
55
"name": "Test",
66
"request": "launch",
7-
"type": "pwa-node",
8-
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
7+
"type": "node",
8+
"program": "${workspaceFolder}/node_modules/.bin/jest",
99
"args": [
10-
"--colors",
11-
"-u", "tdd",
12-
"--timeout", "999999",
13-
"${workspaceFolder}/packages/**/*-spec.ts"
10+
"--runInBand"
1411
],
15-
"runtimeArgs": [
16-
"--require",
17-
"ts-node/register"
12+
"console": "integratedTerminal",
13+
"internalConsoleOptions": "neverOpen",
14+
"disableOptimisticBPs": true,
15+
"windows": {
16+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
17+
},
18+
"cwd": "${workspaceRoot}"
19+
},
20+
{
21+
"name": "Test Current File",
22+
"request": "launch",
23+
"type": "node",
24+
"program": "${workspaceFolder}/node_modules/.bin/jest",
25+
"args": [
26+
"${fileBasenameNoExtension}",
1827
],
19-
"internalConsoleOptions": "openOnSessionStart",
20-
"sourceMaps": true,
21-
"resolveSourceMapLocations": [
22-
"${workspaceFolder}/**",
23-
"!**/node_modules/**"
24-
]
28+
"console": "integratedTerminal",
29+
"internalConsoleOptions": "neverOpen",
30+
"disableOptimisticBPs": true,
31+
"windows": {
32+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
33+
},
34+
"cwd": "${workspaceRoot}"
2535
},
2636
{
2737
"name": "Express",

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
{
33
"editor.formatOnSave": true,
44
"files.insertFinalNewline": true,
5+
"files.exclude": {
6+
"**/tsconfig.tsbuildinfo": true,
7+
"**/node_modules": true,
8+
"test-data": true
9+
},
10+
"search.exclude": {
11+
"**/node_modules": true,
12+
},
513
"prettier.eslintIntegration": true,
614
"typescript.tsdk": "./node_modules/typescript/lib",
715
"cSpell.words": [

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// The file name for reported problems is relative to the opened folder.
1717
"fileLocation": [
1818
"relative",
19-
"${workspaceRoot}/src"
19+
"${workspaceRoot}"
2020
],
2121
// The actual pattern to match problems in the output.
2222
"pattern": {
@@ -43,7 +43,7 @@
4343
// The file name for reported problems is relative to the opened folder.
4444
"fileLocation": [
4545
"relative",
46-
"${workspaceRoot}/src"
46+
"${workspaceRoot}"
4747
],
4848
// The actual pattern to match problems in the output.
4949
"pattern": {

0 commit comments

Comments
 (0)