Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
formatting, and use consistent t.mockImport type hinting
- Loading branch information
Showing
62 changed files
with
941 additions
and
925 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import { pathToFileURL } from 'url' | ||
const base = String(pathToFileURL(__filename)) | ||
const inDist = base.endsWith('dist/commonjs/hooks-url.js') | ||
export const hooks = String(new URL( | ||
inDist ? '../esm/hooks.mjs' : './hooks.mjs', | ||
base | ||
)) | ||
export const hooks = String( | ||
new URL(inDist ? '../esm/hooks.mjs' : './hooks.mjs', base) | ||
) |
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,24 +1,24 @@ | ||
import t from 'tap' | ||
import { hooks } from '../dist/esm/hooks-url.js' | ||
t.equal(String(hooks), String(new URL( | ||
'../dist/esm/hooks.mjs', | ||
import.meta.url | ||
))) | ||
t.equal( | ||
String(hooks), | ||
String(new URL('../dist/esm/hooks.mjs', import.meta.url)) | ||
) | ||
|
||
import { hooks as hooksSrc } from '../src/hooks-url.js' | ||
t.equal(String(hooksSrc), String(new URL( | ||
'../src/hooks.mjs', | ||
import.meta.url | ||
))) | ||
t.equal( | ||
String(hooksSrc), | ||
String(new URL('../src/hooks.mjs', import.meta.url)) | ||
) | ||
|
||
import hooksCJSDist from '../dist/commonjs/hooks-url.js' | ||
t.equal(String(hooksCJSDist.hooks), String(new URL( | ||
'../dist/esm/hooks.mjs', | ||
import.meta.url | ||
))) | ||
t.equal( | ||
String(hooksCJSDist.hooks), | ||
String(new URL('../dist/esm/hooks.mjs', import.meta.url)) | ||
) | ||
|
||
import hooksCJSSrc from '../src/hooks-url-cjs.cjs' | ||
t.equal(String(hooksCJSSrc.hooks), String(new URL( | ||
'../src/hooks.mjs', | ||
import.meta.url | ||
))) | ||
t.equal( | ||
String(hooksCJSSrc.hooks), | ||
String(new URL('../src/hooks.mjs', import.meta.url)) | ||
) |
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.