diff --git a/.editorconfig b/.editorconfig index 4e110004..abf87357 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ insert_final_newline = true trim_trailing_whitespace = true -[{package.json,.travis.yml,.eslintrc,.babelrc}] +[{package.json,.travis.yml,.eslintrc}] indent_size = 2 diff --git a/ghu.js b/ghu.js index 70014be9..2bb93ba9 100644 --- a/ghu.js +++ b/ghu.js @@ -122,17 +122,17 @@ ghu.task('build:tests', ['build:styles'], 'build the test suite', () => { .then(newerThan(`${BUILD}/test/h5ai-styles.css`)) .then(write(`${BUILD}/test/h5ai-styles.css`, {overwrite: true})), - read(`${TEST}/tests.html`) - .then(newerThan(`${BUILD}/test/tests.html`)) - .then(write(`${BUILD}/test/tests.html`, {overwrite: true})), + read(`${TEST}/index.html`) + .then(newerThan(`${BUILD}/test/index.html`)) + .then(write(`${BUILD}/test/index.html`, {overwrite: true})), - read(`${TEST}: tests.js`) + read(`${TEST}: index.js`) .then(webpack(webpackCfg([SRC, TEST]), {showStats: false})) .then(wrap(`\n\n// @include "${SRC}/**/js/pre.js"\n\n`)) .then(includeit()) .then(write(mapfn.p(TEST, `${BUILD}/test`), {overwrite: true})) ]).then(() => { - console.log(`browse to file://${BUILD}/test/tests.html to run the test suite`); + console.log(`browse to file://${BUILD}/test/index.html to run the test suite`); }); }); diff --git a/package.json b/package.json index 2e724519..537ac815 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,9 @@ "devDependencies": { "babel-loader": "6.2.4", "babel-preset-es2015": "6.9.0", - "eslint": "3.0.1", + "eslint": "3.1.1", "ghu": "0.7.0", - "scar": "0.13.0" + "scar": "0.14.0" }, "engines": { "node": ">=6.0.0" diff --git a/src/_h5ai/public/js/pre.js b/src/_h5ai/public/js/pre.js index 5c52145f..d7d76020 100644 --- a/src/_h5ai/public/js/pre.js +++ b/src/_h5ai/public/js/pre.js @@ -27,6 +27,4 @@ /* eslint-enable */ -// @include "vendor/kjua*.js" -// @include "vendor/marked*.js" -// @include "vendor/prism*.js" +// @include "vendor/*.js" diff --git a/test/tests.html b/test/index.html similarity index 83% rename from test/tests.html rename to test/index.html index a1146d61..f51c817d 100644 --- a/test/tests.html +++ b/test/index.html @@ -6,6 +6,6 @@ - + diff --git a/test/tests.js b/test/index.js similarity index 100% rename from test/tests.js rename to test/index.js diff --git a/test/tests/premisses.js b/test/tests/premisses.js index abfc8bec..dfb5e943 100644 --- a/test/tests/premisses.js +++ b/test/tests/premisses.js @@ -1,10 +1,6 @@ const {test, assert} = require('scar'); test('window is global object', () => { - assert.equal(typeof global, 'object'); - assert.equal(global, global.window); -}); - -test('document is global object', () => { - assert.equal(typeof global.document, 'object'); + assert.ok(global.window); + assert.equal(global.window, global.window.window); });