-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use mocha instead of jest to avoid crashes and other issues (…
…#208) * refactor: use mocha instead of jest to avoid needing hacks * chore: fix bundled tests with a reinstall * chore: bump vscode version in CI * chore: remove the experimental workaround from workflow * chore: align workflow with microsoft recommendation * chore: attempt to fix windows issue * chore: fix typo in workflow * chore: try again * chore: again... * chore: attempt to fix windows issue * fix: use shared `expect` instance to avoid Windows issue * chore: restore original content when testing schemas * chore: temporarily disable windows tests
- Loading branch information
Showing
34 changed files
with
1,375 additions
and
2,510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
module.exports = { | ||
ignorePatterns: ['node_modules/**', 'out/**', 'test/fixture/**'], | ||
extends: 'universe/node', | ||
overrides: [ | ||
{ | ||
files: ['*.test.ts', '*.e2e.ts'], | ||
rules: { | ||
// Chai uses patterns such as `expect(true).to.be.true` | ||
'no-unused-expressions': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/node_modules/jest-snapshot/build/SnapshotResolver.js b/node_modules/jest-snapshot/build/SnapshotResolver.js | ||
index a3d3b05..69f0132 100644 | ||
--- a/node_modules/jest-snapshot/build/SnapshotResolver.js | ||
+++ b/node_modules/jest-snapshot/build/SnapshotResolver.js | ||
@@ -13,7 +13,7 @@ var path = _interopRequireWildcard(require('path')); | ||
|
||
var _chalk = _interopRequireDefault(require('chalk')); | ||
|
||
-var _transform = require('@jest/transform'); | ||
+// var _transform = require('@jest/transform'); | ||
|
||
var _jestUtil = require('jest-util'); | ||
|
||
@@ -81,7 +81,9 @@ const cache = new Map(); | ||
|
||
const buildSnapshotResolver = async ( | ||
config, | ||
- localRequire = (0, _transform.createTranspilingRequire)(config) | ||
+ // Default to just `require` instead of the failing transpile require | ||
+ localRequire = require, | ||
+ // localRequire = (0, _transform.createTranspilingRequire)(config) | ||
) => { | ||
var _cache$get; | ||
|
||
@@ -133,6 +135,7 @@ async function createCustomSnapshotResolver( | ||
const custom = (0, _jestUtil.interopRequireDefault)( | ||
await localRequire(snapshotResolverPath) | ||
).default; | ||
+ | ||
const keys = [ | ||
['resolveSnapshotPath', 'function'], | ||
['resolveTestPath', 'function'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/node_modules/mocha-chai-jest-snapshot/dist/helper.js b/node_modules/mocha-chai-jest-snapshot/dist/helper.js | ||
index ea59a3c..8ac2b7f 100644 | ||
--- a/node_modules/mocha-chai-jest-snapshot/dist/helper.js | ||
+++ b/node_modules/mocha-chai-jest-snapshot/dist/helper.js | ||
@@ -5,14 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readJestConfig = exports.snapshotOptions = void 0; | ||
const path_1 = __importDefault(require("path")); | ||
-const yargs_1 = __importDefault(require("yargs")); | ||
+// const yargs_1 = __importDefault(require("yargs")); | ||
const ARGV_CI = !!process.env.CI; | ||
-const ARGV_UPDATE_SNAPSHOT = !!process.env.UPDATE_SNAPSHOT || | ||
- yargs_1.default | ||
- .options({ | ||
- update: { type: "boolean", default: false }, | ||
- }) | ||
- .parseSync().update; | ||
+const ARGV_UPDATE_SNAPSHOT = !!process.env.UPDATE_SNAPSHOT// || | ||
+ // yargs_1.default | ||
+ // .options({ | ||
+ // update: { type: "boolean", default: false }, | ||
+ // }) | ||
+ // .parseSync().update; | ||
exports.snapshotOptions = { | ||
updateSnapshot: ARGV_CI && !ARGV_UPDATE_SNAPSHOT | ||
? "none" |
Oops, something went wrong.