-
Notifications
You must be signed in to change notification settings - Fork 13
Rewrite the test runner to work with Jest 27 #68
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
Changes from all commits
8400854
9429b3f
d515096
6f84176
d5480fd
2f09c2f
daa8d37
23cb4c9
d8823fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: ['./tsconfig.json'], | ||
}, | ||
extends: '@exercism/eslint-config-tooling', | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
// This file is only used by jest.runner.config.js, when running the | ||
// test-runner. The tool itself uses typescript's compilation instead. | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
}, | ||
useBuiltIns: false, | ||
}, | ||
], | ||
], | ||
presets: ['@exercism/babel-preset-javascript'], | ||
plugins: [], | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ | ||
module.exports = { | ||
verbose: true, | ||
modulePathIgnorePatterns: ['package.json'], | ||
transform: { | ||
'^.+\\.[t|j]sx?$': 'babel-jest', | ||
}, | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
verbose: true, | ||
modulePathIgnorePatterns: ['package.json'], | ||
transform: { | ||
'^.+\\.[t|j]sx?$': 'babel-jest', | ||
}, | ||
reporters: [], | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@exercism/javascript-test-runner", | ||
"description": "Automated Test runner for exercism solutions in Javascript.", | ||
"author": "Derk-Jan Karrenbeld <[email protected]>", | ||
"version": "2.5.1", | ||
"version": "3.0.0", | ||
"license": "AGPL-3.0-or-later", | ||
"repository": { | ||
"type": "git", | ||
|
@@ -24,38 +24,37 @@ | |
"watch": "yarn build -w", | ||
"prepare": "yarn build", | ||
"prepublishOnly": "yarn test:bare && yarn lint", | ||
"lint": "yarn eslint . --ext ts,js,tsx,jsx,mjs -c .eslintrc", | ||
"lint": "yarn eslint src --ext ts,js,tsx,jsx,mjs -c .eslintrc.js && yarn eslint test --ext ts,js,tsx,jsx,mjs -c test/.eslintrc.js", | ||
"test": "yarn build && yarn test:bare", | ||
"test:bare": "jest --roots test --testPathIgnorePatterns=\"fixtures/\"" | ||
}, | ||
"dependencies": { | ||
"@babel/cli": "^7.15.4", | ||
"@babel/core": "^7.15.5", | ||
"@babel/node": "^7.15.4", | ||
"@babel/preset-env": "^7.15.4", | ||
"@babel/preset-typescript": "^7.15.0", | ||
"@exercism/static-analysis": "^0.10.0", | ||
"@typescript-eslint/typescript-estree": "^4.30.0", | ||
"@typescript-eslint/visitor-keys": "^4.30.0", | ||
"babel-jest": "^26.6.3", | ||
"chalk": "^4.1.2", | ||
"jest": "^26.6.3", | ||
"jest-util": "^26.6.2", | ||
"slash": "^3.0.0", | ||
"string-length": "^4.0.2" | ||
"@babel/core": "^7.17.0", | ||
"@babel/node": "^7.16.8", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@exercism/babel-preset-javascript": "^0.1.2", | ||
"@exercism/static-analysis": "^0.11.0", | ||
"@typescript-eslint/typescript-estree": "^5.10.2", | ||
"@typescript-eslint/visitor-keys": "^5.10.2", | ||
"babel-jest": "^27.5.0", | ||
"chalk": "^5.0.0", | ||
"jest": "^27.5.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^26.0.24", | ||
"@types/node": "^14.17.14", | ||
"@typescript-eslint/eslint-plugin": "^4.30.0", | ||
"@typescript-eslint/parser": "^4.30.0", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^7.32.0", | ||
"@exercism/eslint-config-tooling": "^0.4.0", | ||
"@tsconfig/node16": "^1.0.2", | ||
"@types/jest": "^27.4.0", | ||
"@types/node": "^16.11.22", | ||
"@typescript-eslint/eslint-plugin": "^5.10.2", | ||
"@typescript-eslint/parser": "^5.10.2", | ||
"eslint": "^8.8.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"eslint-plugin-jest": "^24.4.0", | ||
"prettier": "^2.3.2", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-jest": "^26.0.0", | ||
"prettier": "^2.5.1", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.4.2" | ||
"ts-jest": "^27.1.3", | ||
"typescript": "^4.5.5" | ||
} | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
fixtures/* | ||
|
||
.eslintrc | ||
.eslintrc.* |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: ['./tsconfig.json'], | ||
}, | ||
env: { | ||
jest: true, | ||
}, | ||
extends: ['../.eslintrc.js'], | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,5 @@ | ||
{ | ||
"compilerOptions": { | ||
/* Basic Options */ | ||
"target": "ESNEXT" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, | ||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, | ||
"lib": [ | ||
"esnext" | ||
] /* Specify library files to be included in the compilation. */, | ||
// "allowJs": true, /* Allow javascript files to be compiled. */ | ||
// "checkJs": true, /* Report errors in .js files. */ | ||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | ||
// "declaration": true, /* Generates corresponding '.d.ts' file. */ | ||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ | ||
// "sourceMap": true, /* Generates corresponding '.map' file. */ | ||
// "outFile": "./", /* Concatenate and emit output to single file. */ | ||
"outDir": "./dist" /* Redirect output structure to the directory. */, | ||
"rootDirs": [ | ||
"./src" | ||
] /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */, | ||
// "composite": true, /* Enable project compilation */ | ||
// "removeComments": true, /* Do not emit comments to output. */ | ||
// "noEmit": true, /* Do not emit outputs. */ | ||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */ | ||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ | ||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ | ||
|
||
/* Strict Type-Checking Options */ | ||
"strict": true /* Enable all strict type-checking options. */, | ||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
// "strictNullChecks": true, /* Enable strict null checks. */ | ||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */ | ||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ | ||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ | ||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ | ||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ | ||
|
||
/* Additional Checks */ | ||
// "noUnusedLocals": true, /* Report errors on unused locals. */ | ||
"noUnusedParameters": true /* Report errors on unused parameters. */, | ||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ | ||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ | ||
|
||
/* Module Resolution Options */ | ||
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, | ||
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */, | ||
// "paths": { "~src/*": ["./src/*"] }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ | ||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ | ||
// "typeRoots": [], /* List of folders to include type definitions from. */ | ||
// "types": [], /* Type declaration files to be included in compilation. */ | ||
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ | ||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ | ||
|
||
/* Source Map Options */ | ||
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ | ||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ | ||
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ | ||
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ | ||
|
||
/* Experimental Options */ | ||
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ | ||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ | ||
} | ||
"extends": "@tsconfig/node16/tsconfig.json", | ||
"include": ["src"], | ||
"exclude": ["test", "node_modules"] | ||
} |
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file seems empty now (everything commented out), can it be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could, but we'll likely need it to process task IDs (which will come later) so I just left it.