-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update the ci to run in the maintained versions of node * Remove unused stuff from the node:test example * Update the node:test example with a better reporter node:test's default reporter is really limted, and doesn't print the errors that earl generates in a nice way. I replaced it with a better one, which behaves like mocha. * Fix stack trace test * Use glob -c in the node:test example * Fix file:// URLs handling * Fix example plugin * Add changeset
- Loading branch information
1 parent
de7b3bd
commit 530bf06
Showing
15 changed files
with
737 additions
and
24 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"earl": minor | ||
--- | ||
|
||
Add support for node:test |
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 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,23 @@ | ||
import { describe, it } from 'node:test' | ||
import { expect } from 'earl' | ||
import 'example-plugin' | ||
|
||
describe('example-plugin', () => { | ||
it('EvenNumberMatcher works', () => { | ||
expect(2).toEqual(expect.evenNumber()) | ||
}) | ||
|
||
it('EvenNumberMatchers is type safe', () => { | ||
// @ts-expect-error - type mismatch | ||
expect('2').not.toEqual(expect.evenNumber()) | ||
}) | ||
|
||
it('toBeEven works', () => { | ||
expect(2).toBeEven() | ||
}) | ||
|
||
it('toBeEven is type safe', () => { | ||
// @ts-expect-error - type mismatch | ||
expect('foo').not.toBeEven() | ||
}) | ||
}) |
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 @@ | ||
{ "type": "commonjs" } |
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,2 +1,2 @@ | ||
import './evenNumber' | ||
import './toBeEven' | ||
import './evenNumber.js' | ||
import './toBeEven.js' |
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,10 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"module": "CommonJS", | ||
"moduleResolution": "Node", | ||
"verbatimModuleSyntax": false, | ||
"outDir": "dist/cjs" | ||
}, | ||
"exclude": ["dist", "src/test", "src/**/*.test.ts"] | ||
} |
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,4 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["dist", "src/test", "src/**/*.test.ts"] | ||
} |
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,8 +1,23 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
"lib": ["ESNext", "DOM", "DOM.Iterable"], | ||
"target": "ESNext", | ||
"module": "NodeNext", | ||
"moduleResolution": "NodeNext", | ||
"esModuleInterop": true, | ||
"verbatimModuleSyntax": true, | ||
|
||
"strict": true, | ||
"noImplicitOverride": true, | ||
"noUncheckedIndexedAccess": true, | ||
|
||
"sourceMap": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
|
||
"skipLibCheck": true, | ||
|
||
"outDir": "dist/esm" | ||
}, | ||
"include": ["src"] | ||
"exclude": ["dist"] | ||
} |
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 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
Oops, something went wrong.