-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(unpkg): remove json flag + add unit test (#392)
- Loading branch information
1 parent
d2f00e2
commit d706694
Showing
2 changed files
with
17 additions
and
1 deletion.
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,17 @@ | ||
import { fileExistsInUnpkg } from '../unpkg.js'; | ||
|
||
describe('unpkg', () => { | ||
it('should do a successful HEAD request', async () => { | ||
const exists = await fileExistsInUnpkg('jest', '24.8.0', 'bin/jest.js'); | ||
expect(exists).toBe(true); | ||
}); | ||
|
||
it('should do a failed HEAD request', async () => { | ||
const exists = await fileExistsInUnpkg( | ||
'jest', | ||
'24.8.0', | ||
'bin/notexists.js' | ||
); | ||
expect(exists).toBe(false); | ||
}); | ||
}); |
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