feat: ServiceWorkerMain.scriptURL (#45863)
feat: serviceWorker.scriptURL
This commit is contained in:
parent
30d2fadb28
commit
afca4e271e
4 changed files with 23 additions and 0 deletions
|
@ -314,6 +314,17 @@ describe('ServiceWorkerMain module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("'scriptURL' property", () => {
|
||||
it('matches the expected value', async () => {
|
||||
loadWorkerScript();
|
||||
const serviceWorker = await waitForServiceWorker();
|
||||
expect(serviceWorker).to.not.be.undefined();
|
||||
if (!serviceWorker) return;
|
||||
expect(serviceWorker).to.have.property('scriptURL').that.is.a('string');
|
||||
expect(serviceWorker.scriptURL).to.equal(`${baseUrl}/sw.js`);
|
||||
});
|
||||
});
|
||||
|
||||
describe('ipc', () => {
|
||||
beforeEach(() => {
|
||||
registerPreload('preload-tests.js');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue