-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for multiple assets folders
- Loading branch information
1 parent
dc4cabf
commit 8f1b1f2
Showing
9 changed files
with
119 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "a": 1 } |
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 @@ | ||
hello world |
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,27 @@ | ||
/* eslint-disable no-undef */ | ||
// eslint-disable-next-line strict | ||
const { is } = require('uvu/assert') | ||
|
||
describe('assets', () => { | ||
it('can fetch a and package.json', async () => { | ||
// assets from cwd is available | ||
is( | ||
await fetch(new URL('package.json', import.meta.url)).then( | ||
(res) => res.status | ||
), | ||
200 | ||
) | ||
|
||
// assets from a | ||
is( | ||
await fetch(new URL('a.json', import.meta.url)).then((res) => res.status), | ||
200 | ||
) | ||
|
||
// assets from b | ||
is( | ||
await fetch(new URL('b.txt', import.meta.url)).then((res) => res.status), | ||
404 | ||
) | ||
}) | ||
}) |
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,27 @@ | ||
/* eslint-disable no-undef */ | ||
// eslint-disable-next-line strict | ||
const { is } = require('uvu/assert') | ||
|
||
describe('assets', () => { | ||
it('can fetch a, b and package.json', async () => { | ||
// assets from cwd is available | ||
is( | ||
await fetch(new URL('package.json', import.meta.url)).then( | ||
(res) => res.status | ||
), | ||
200 | ||
) | ||
|
||
// assets from a | ||
is( | ||
await fetch(new URL('a.json', import.meta.url)).then((res) => res.status), | ||
200 | ||
) | ||
|
||
// assets from b | ||
is( | ||
await fetch(new URL('b.txt', import.meta.url)).then((res) => res.status), | ||
200 | ||
) | ||
}) | ||
}) |
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