-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: ensure scope handling * fix: chrome esm * chore: update dev dependencies * fix: fallback for platform
- Loading branch information
Christoffer Åström
committed
Jun 7, 2019
1 parent
8dcedca
commit 02f2db1
Showing
14 changed files
with
131 additions
and
109 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
<!doctype> | ||
<!DOCTYPE > | ||
<html> | ||
<head> | ||
<title>Test</title> | ||
<meta charset="utf-8" /> | ||
</head> | ||
|
||
<head> | ||
<title>Test</title> | ||
<meta charset="utf-8"> | ||
</head> | ||
|
||
<body> | ||
<script src="/node_modules/mocha/mocha.js"></script> | ||
<script src="/node_modules/chai/chai.js"></script> | ||
<script> | ||
window.expect = chai.expect; | ||
</script> | ||
<script type="module"> | ||
function loadFromScript(src) { | ||
return new Promise((resolve, reject) => { | ||
const script = document.createElement('script'); | ||
script.type = 'text/javascript'; | ||
script.async = false; | ||
script.type = 'module'; | ||
script.onload = () => { | ||
resolve(); | ||
}; | ||
script.onerror = (e) => { | ||
reject(e); | ||
}; | ||
script.src = src; | ||
document.documentElement.appendChild(script); | ||
}); | ||
} | ||
(async () => { | ||
await Promise.all(window.awFiles.map(f => loadFromScript(f))); | ||
mocha.run(); | ||
})(); | ||
</script> | ||
</body> | ||
|
||
<body> | ||
<script src="/node_modules/mocha/mocha.js"></script> | ||
<script src="/node_modules/chai/chai.js"></script> | ||
<script> | ||
window.expect = chai.expect; | ||
</script> | ||
<script type="module"> | ||
function loadFromScript(src) { | ||
return new Promise((resolve, reject) => { | ||
const script = document.createElement('script'); | ||
script.setAttribute('type', 'module'); | ||
script.setAttribute('src', src); | ||
script.addEventListener('load', resolve); | ||
script.addEventListener('error', reject); | ||
script.addEventListener('abort', () => | ||
reject('Script loading aborted.') | ||
); | ||
document.head.appendChild(script); | ||
}); | ||
} | ||
(async () => { | ||
try { | ||
await Promise.all(window.awFiles.map(f => loadFromScript(f))); | ||
} catch (e) { | ||
console.error( | ||
JSON.stringify(e, ['message', 'arguments', 'type', 'name']) | ||
); | ||
} | ||
mocha.run(); | ||
})(); | ||
</script> | ||
</body> | ||
</html> |
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
Oops, something went wrong.