Skip to content

Commit

Permalink
refactor!: require vscode 1.71+, jest 29+
Browse files Browse the repository at this point in the history
also:
- reworks e2e tests to reliably pass
- switched node-ipc out for @achrinza/node-ipc due to security concerns
  • Loading branch information
adalinesimonian committed Oct 5, 2022
1 parent e4d82c5 commit f779c3a
Show file tree
Hide file tree
Showing 59 changed files with 19,150 additions and 2,127 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,4 @@ node_modules
# build artifacts
/dist
tsconfig.tsbuildinfo
e2e/**/jest-output.json
e2e/**/yarn.lock
e2e/**/.pnp.*
e2e/**/.vscode-test
package.tgz

# vscode binaries
.vscode-test
1 change: 1 addition & 0 deletions .vscode-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*/
25 changes: 4 additions & 21 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
{
"editor.rulers": [
80,
120
],
"editor.rulers": [80, 120],
"search.exclude": {
".yarn": true,
"dist": true,
"**/.yarn": true,
"**/.pnp.*": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"[javascript][typescript][json][jsonc][markdown][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"eslint.nodePath": ".yarn/sdks",
Expand Down
Empty file modified .yarn/releases/yarn-3.2.3.cjs
100755 → 100644
Empty file.
Empty file modified .yarn/sdks/eslint/bin/eslint.js
100755 → 100644
Empty file.
Empty file modified .yarn/sdks/prettier/index.js
100755 → 100644
Empty file.
Empty file modified .yarn/sdks/typescript/bin/tsc
100755 → 100644
Empty file.
Empty file modified .yarn/sdks/typescript/bin/tsserver
100755 → 100644
Empty file.
5 changes: 5 additions & 0 deletions e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*/.yarn/*
!*/.yarn/releases
**/jest-output.json
**/.pnp.*
/.yarn/cache/*
1 change: 1 addition & 0 deletions e2e/.yarnrc.base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cacheFolder: ../.yarn/cache
36 changes: 19 additions & 17 deletions e2e/__tests__/__snapshots__/failing-tests.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Failing tests should fail tests 1`] = `
Object {
{
"numFailedTestSuites": 2,
"numFailedTests": 2,
"numPassedTestSuites": 0,
Expand All @@ -12,45 +12,47 @@ Object {
"numTodoTests": 0,
"numTotalTestSuites": 2,
"numTotalTests": 2,
"openHandles": Array [],
"snapshot": Object {
"openHandles": [],
"snapshot": {
"added": 0,
"didUpdate": false,
"failure": false,
"filesAdded": 0,
"filesRemoved": 0,
"filesRemovedList": Array [],
"filesRemovedList": [],
"filesUnmatched": 0,
"filesUpdated": 0,
"matched": 0,
"total": 0,
"unchecked": 0,
"uncheckedKeysByFile": Array [],
"uncheckedKeysByFile": [],
"unmatched": 0,
"updated": 0,
},
"startTime": undefined,
"success": false,
"testResults": Array [
Object {
"assertionResults": Array [
Object {
"ancestorTitles": Array [
"testResults": [
{
"assertionResults": [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [
"duration": undefined,
"failureMessages": [
"",
],
"fullName": "Describe should test",
"location": null,
"status": "failed",
"title": "should test",
},
Object {
"ancestorTitles": Array [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [
"duration": undefined,
"failureMessages": [
"",
],
"fullName": "Describe should test async",
Expand All @@ -67,9 +69,9 @@ Object {
"status": "failed",
"summary": "",
},
Object {
"assertionResults": Array [],
"coverage": Object {},
{
"assertionResults": [],
"coverage": {},
"endTime": undefined,
"failureMessage": "",
"message": "",
Expand Down
48 changes: 26 additions & 22 deletions e2e/__tests__/__snapshots__/passing-tests.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Passing tests should pass tests 1`] = `
Object {
{
"numFailedTestSuites": 0,
"numFailedTests": 0,
"numPassedTestSuites": 2,
Expand All @@ -12,31 +12,32 @@ Object {
"numTodoTests": 0,
"numTotalTestSuites": 2,
"numTotalTests": 4,
"openHandles": Array [],
"snapshot": Object {
"openHandles": [],
"snapshot": {
"added": 0,
"didUpdate": false,
"failure": false,
"filesAdded": 0,
"filesRemoved": 0,
"filesRemovedList": Array [],
"filesRemovedList": [],
"filesUnmatched": 0,
"filesUpdated": 0,
"matched": 0,
"total": 0,
"unchecked": 0,
"uncheckedKeysByFile": Array [],
"uncheckedKeysByFile": [],
"unmatched": 0,
"updated": 0,
},
"startTime": undefined,
"success": true,
"testResults": Array [
Object {
"assertionResults": Array [
Object {
"ancestorTitles": Array [],
"failureMessages": Array [],
"testResults": [
{
"assertionResults": [
{
"ancestorTitles": [],
"duration": undefined,
"failureMessages": [],
"fullName": "should pass a test in a subdirectory",
"location": null,
"status": "passed",
Expand All @@ -51,33 +52,36 @@ Object {
"status": "passed",
"summary": "",
},
Object {
"assertionResults": Array [
Object {
"ancestorTitles": Array [
{
"assertionResults": [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [],
"duration": undefined,
"failureMessages": [],
"fullName": "Describe should test",
"location": null,
"status": "passed",
"title": "should test",
},
Object {
"ancestorTitles": Array [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [],
"duration": undefined,
"failureMessages": [],
"fullName": "Describe should test async",
"location": null,
"status": "passed",
"title": "should test async",
},
Object {
"ancestorTitles": Array [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [],
"duration": undefined,
"failureMessages": [],
"fullName": "Describe should test with logs",
"location": null,
"status": "passed",
Expand Down
30 changes: 16 additions & 14 deletions e2e/__tests__/__snapshots__/snapshots.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Snapshot tests should pass tests 1`] = `
Object {
{
"numFailedTestSuites": 0,
"numFailedTests": 0,
"numPassedTestSuites": 1,
Expand All @@ -12,43 +12,45 @@ Object {
"numTodoTests": 0,
"numTotalTestSuites": 1,
"numTotalTests": 2,
"openHandles": Array [],
"snapshot": Object {
"openHandles": [],
"snapshot": {
"added": 0,
"didUpdate": false,
"failure": false,
"filesAdded": 0,
"filesRemoved": 0,
"filesRemovedList": Array [],
"filesRemovedList": [],
"filesUnmatched": 0,
"filesUpdated": 0,
"matched": 2,
"total": 2,
"unchecked": 0,
"uncheckedKeysByFile": Array [],
"uncheckedKeysByFile": [],
"unmatched": 0,
"updated": 0,
},
"startTime": undefined,
"success": true,
"testResults": Array [
Object {
"assertionResults": Array [
Object {
"ancestorTitles": Array [
"testResults": [
{
"assertionResults": [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [],
"duration": undefined,
"failureMessages": [],
"fullName": "Describe should test",
"location": null,
"status": "passed",
"title": "should test",
},
Object {
"ancestorTitles": Array [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [],
"duration": undefined,
"failureMessages": [],
"fullName": "Describe should test async",
"location": null,
"status": "passed",
Expand Down
30 changes: 16 additions & 14 deletions e2e/__tests__/__snapshots__/ts-passing-tests.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Passing tests (ts-jest) should pass tests 1`] = `
Object {
{
"numFailedTestSuites": 0,
"numFailedTests": 0,
"numPassedTestSuites": 1,
Expand All @@ -12,43 +12,45 @@ Object {
"numTodoTests": 0,
"numTotalTestSuites": 1,
"numTotalTests": 2,
"openHandles": Array [],
"snapshot": Object {
"openHandles": [],
"snapshot": {
"added": 0,
"didUpdate": false,
"failure": false,
"filesAdded": 0,
"filesRemoved": 0,
"filesRemovedList": Array [],
"filesRemovedList": [],
"filesUnmatched": 0,
"filesUpdated": 0,
"matched": 0,
"total": 0,
"unchecked": 0,
"uncheckedKeysByFile": Array [],
"uncheckedKeysByFile": [],
"unmatched": 0,
"updated": 0,
},
"startTime": undefined,
"success": true,
"testResults": Array [
Object {
"assertionResults": Array [
Object {
"ancestorTitles": Array [
"testResults": [
{
"assertionResults": [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [],
"duration": undefined,
"failureMessages": [],
"fullName": "Describe should test",
"location": null,
"status": "passed",
"title": "should test",
},
Object {
"ancestorTitles": Array [
{
"ancestorTitles": [
"Describe",
],
"failureMessages": Array [],
"duration": undefined,
"failureMessages": [],
"fullName": "Describe should test async",
"location": null,
"status": "passed",
Expand Down

0 comments on commit f779c3a

Please sign in to comment.