This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update all tests because of prettier
- Loading branch information
1 parent
f661c9e
commit a357415
Showing
140 changed files
with
861 additions
and
436 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 |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
/bazel-out | ||
/e2e/out | ||
packages/*/dist/ | ||
packages/*/.tsbuildinfo | ||
packages/*/package-lock.json | ||
|
||
# Node | ||
|
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
File renamed without changes.
File renamed without changes.
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,23 @@ | ||
import * as cp from 'child_process'; | ||
import * as fs from 'fs'; | ||
|
||
// Execute Git command | ||
const git = args => cp.spawnSync('git', args, { stdio: 'inherit' }); | ||
|
||
// Ensure that we're inside a Git repository | ||
// If git command is not found, status is null and we should return | ||
// That's why status value needs to be checked explicitly | ||
if (git(['rev-parse']).status !== 0) { | ||
throw new Error('git command not found, skipping install'); | ||
} | ||
|
||
// Ensure that cwd is git top level | ||
if (!fs.existsSync('.git')) { | ||
throw new Error('.git can\'t be found'); | ||
} | ||
|
||
const { error } = git(['config', 'core.hooksPath', '.hooks']); | ||
|
||
if (error) { | ||
throw error; | ||
} |
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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { getTestResult } from '../../utils.js'; | ||
import { getTestResult, test, updateExpectedOutput } from '../../utils.js'; | ||
import { describe, expect } from 'vitest'; | ||
|
||
const category = 'class'; | ||
const subcategory = 'abstract'; | ||
const { actual, expected } = await getTestResult({ category, subcategory }); | ||
|
||
describe(`${category}/${subcategory}`, () => { | ||
it('should reflect the expected modules', () => { | ||
test('should reflect the expected modules', ({ update }) => { | ||
const result = actual.map(m => m.serialize()); | ||
|
||
if (update) { | ||
updateExpectedOutput(result, category, subcategory); | ||
return; | ||
} | ||
|
||
expect(result).to.deep.equal(expected); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { getTestResult } from '../../utils.js'; | ||
import { getTestResult, test, updateExpectedOutput } from '../../utils.js'; | ||
import { describe, expect } from 'vitest'; | ||
|
||
const category = 'class'; | ||
const subcategory = 'basic'; | ||
const { actual, expected } = await getTestResult({ category, subcategory }); | ||
|
||
describe(`${category}/${subcategory}`, () => { | ||
it('should reflect the expected modules', () => { | ||
test('should reflect the expected modules', ({ update }) => { | ||
const result = actual.map(m => m.serialize()); | ||
|
||
if (update) { | ||
updateExpectedOutput(result, category, subcategory); | ||
return; | ||
} | ||
|
||
expect(result).to.deep.equal(expected); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { getTestResult } from '../../utils.js'; | ||
import { getTestResult, updateExpectedOutput, test } from '../../utils.js'; | ||
import { describe, expect } from 'vitest'; | ||
|
||
const category = 'class'; | ||
const subcategory = 'class-expressions'; | ||
const { actual, expected } = await getTestResult({ category, subcategory }); | ||
|
||
describe(`${category}/${subcategory}`, () => { | ||
it('should reflect the expected modules', () => { | ||
test('should reflect the expected modules', ({ update }) => { | ||
const result = actual.map(m => m.serialize()); | ||
|
||
if (update) { | ||
updateExpectedOutput(result, category, subcategory); | ||
return; | ||
} | ||
|
||
expect(result).to.deep.equal(expected); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -71,4 +71,4 @@ | |
} | ||
] | ||
} | ||
] | ||
] |
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,13 +1,19 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { getTestResult } from '../../utils.js'; | ||
import { getTestResult, updateExpectedOutput, test } from '../../utils.js'; | ||
import { describe, expect } from 'vitest'; | ||
|
||
const category = 'class'; | ||
const subcategory = 'default-inheritance'; | ||
const { actual, expected } = await getTestResult({ category, subcategory }); | ||
|
||
describe(`${category}/${subcategory}`, () => { | ||
it('should reflect the expected modules', () => { | ||
test('should reflect the expected modules', ({ update }) => { | ||
const result = actual.map(m => m.serialize()); | ||
|
||
if (update) { | ||
updateExpectedOutput(result, category, subcategory); | ||
return; | ||
} | ||
|
||
expect(result).to.deep.equal(expected); | ||
}); | ||
}); |
Oops, something went wrong.