-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: require dist/ipfs-sw-sw.js existence (#106)
* test: require dist/ipfs-sw-sw.js existence * chore: fix postbuild test lint dir
- Loading branch information
Showing
8 changed files
with
26 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Tests | ||
|
||
These tests are ran using `aegir test`. | ||
|
||
Since we don't use aegir for building our dist folder, we need all tests in this directory to be javascript files. This is a temporary solution until we can use aegir for building our dist folder. |
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 @@ | ||
/* eslint-env mocha */ | ||
import { constants } from 'node:fs' | ||
import { access } from 'node:fs/promises' | ||
import { resolve, dirname } from 'node:path' | ||
import { fileURLToPath } from 'node:url' | ||
import { expect } from 'aegir/chai' | ||
|
||
const cwd = dirname(fileURLToPath(import.meta.url)) | ||
|
||
describe('verify-dist', async () => { | ||
it('has a service worker with the correct name', async () => { | ||
/** | ||
* test to confirm that the service worker generated in /dist does not change names | ||
*/ | ||
await expect(access(resolve(cwd, '../dist/ipfs-sw-sw.js'), constants.F_OK)).to.not.be.rejected() | ||
}) | ||
}) |
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 |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
}, | ||
"include": [ | ||
"src", | ||
"tests", | ||
"webpack-tests", | ||
"types/svg.d.ts" | ||
] | ||
} |
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