Skip to content

Commit

Permalink
Added tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Mar 2, 2020
1 parent a461ee8 commit 6c01378
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 39 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -54,6 +54,9 @@ jobs:
- run: npm run lint
- run: npm run build
- run: npm run test
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}

# Publish Python package and Docker image
publish:
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -31,6 +31,7 @@
"build": "make build",
"clean": "make clean",
"lint": "make lint",
"test": "make test",
"watch": "make watch"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/worker/index.ts
Expand Up @@ -123,9 +123,11 @@ export class IFrameWorker implements Worker {
* Immediately terminate the worker
*/
public terminate() {
document.body.removeChild(this.iframe)

/* Unregister internal listeners */
window.removeEventListener("message", this.handleMessage)
window.onerror = null
this.iframe.remove()
}

/**
Expand Down
35 changes: 0 additions & 35 deletions tests/config/browsers/unit.json
Expand Up @@ -26,40 +26,5 @@
"version": "latest-1",
"platform": "Windows 7",
"screenResolution": "1280x1024"
},
"edge15": {
"base": "SauceLabs",
"browserName": "MicrosoftEdge",
"version": "15",
"platform": "Windows 10",
"screenResolution": "1280x1024"
},
"edge14": {
"base": "SauceLabs",
"browserName": "MicrosoftEdge",
"version": "14",
"platform": "Windows 10",
"screenResolution": "1280x1024"
},
"edge13": {
"base": "SauceLabs",
"browserName": "MicrosoftEdge",
"version": "13",
"platform": "Windows 10",
"screenResolution": "1280x1024"
},
"ie11": {
"base": "SauceLabs",
"browserName": "internet explorer",
"version": "11",
"platform": "Windows 10",
"screenResolution": "1280x1024"
},
"ie10": {
"base": "SauceLabs",
"browserName": "internet explorer",
"version": "10",
"platform": "Windows 8",
"screenResolution": "1280x1024"
}
}
2 changes: 1 addition & 1 deletion tests/workers/error.js
Expand Up @@ -24,6 +24,6 @@
* Worker
* ------------------------------------------------------------------------- */

addEventListener("message", () => {
addEventListener("message", function() {
throw new Error("Error in worker")
})
2 changes: 1 addition & 1 deletion tests/workers/message.js
Expand Up @@ -24,6 +24,6 @@
* Worker
* ------------------------------------------------------------------------- */

addEventListener("message", () => {
addEventListener("message", function() {
postMessage("pong")
})
2 changes: 1 addition & 1 deletion tests/workers/scripts.js
Expand Up @@ -29,6 +29,6 @@ importScripts(
"base/workers/script-import-b.js"
)

addEventListener("message", () => {
addEventListener("message", function() {
postMessage(a + b)
})

0 comments on commit 6c01378

Please sign in to comment.