Skip to content

Commit

Permalink
Include a webpack smoke test
Browse files Browse the repository at this point in the history
This adds a webpack smoke test that builds a basic app and makes sure it
works. Closes #4200
  • Loading branch information
matthewp committed Jun 15, 2018
1 parent 3017c4e commit 186cc7f
Show file tree
Hide file tree
Showing 6 changed files with 892 additions and 3 deletions.
10 changes: 7 additions & 3 deletions package.json
Expand Up @@ -8,17 +8,20 @@
"postversion": "git push --tags && git checkout - && git branch -D release && git push",
"testee": "testee test/index.html --browsers firefox",
"testee-production": "testee test/production.html --browsers firefox",
"testee-builders": "testee test/builders/test.html --browsers firefox",
"http-server": "http-server -p 3000 --silent",
"test": "npm run test-development && npm run test-production",
"test": "npm run test-development && npm run test-production && npm run test-builders",
"test-development": "npm run build && npm run testee",
"test-production": "npm run build && npm run build-tests && npm run testee-production",
"test-builders": "npm run build-webpack-test && npm run testee-builders",
"ci": "npm run build && npm run test && node test/test-sauce-labs.js",
"release:pre": "npm version prerelease && npm run build && npm publish --tag=pre",
"release:patch": "npm version patch && npm run build && npm publish",
"release:minor": "npm version minor && npm run build && npm publish",
"release:major": "npm version major && npm run build && npm publish",
"build": "node build.js",
"build-tests": "node test/build.js",
"build-webpack-test": "webpack -o test/builders/webpack/bundle.js test/builders/webpack/index.js",
"document": "npm run deps-bundle && bit-docs",
"document:force": "npm run deps-bundle && bit-docs -fd",
"deps-bundle": "steal-tools bundle --deps --no-minify"
Expand Down Expand Up @@ -47,7 +50,7 @@
"can-attribute-observable": "<2.0.0",
"can-component": "^4.1.0",
"can-compute": "4.0.3",
"can-connect": "^3.0.0-pre.6",
"can-connect": "^3.0.0-pre.10",
"can-connect-feathers": "^5.0.0-pre.2",
"can-construct": "^3.4.3",
"can-construct-super": "3.1.4",
Expand Down Expand Up @@ -160,7 +163,8 @@
"steal-stache": "^4.0.0",
"steal-tools": "^1.3.6",
"test-saucelabs": "0.0.3",
"testee": "^0.7.0"
"testee": "^0.7.0",
"webpack-cli": "^3.0.7"
},
"demos": [
"http://canjs.us/#examples",
Expand Down
6 changes: 6 additions & 0 deletions test/builders/test.html
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<title>CanJS Builder tests</title>
<script src="../../node_modules/steal/steal.js"
main="can/test/builders/test"
env="canjs-test"></script>
<div id="qunit-fixture"></div>
18 changes: 18 additions & 0 deletions test/builders/test.js
@@ -0,0 +1,18 @@
var QUnit = require("steal-qunit");

var makeIframe = function(src){
var iframe = document.createElement('iframe');
window.removeMyself = function(){
delete window.removeMyself;
document.body.removeChild(iframe);
QUnit.start();
};
document.body.appendChild(iframe);
iframe.src = src;
};

QUnit.module("webpack");

QUnit.asyncTest("able to load an app", function(){
makeIframe(__dirname + "/webpack/site.html?" + Math.random());
});

0 comments on commit 186cc7f

Please sign in to comment.