diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-04-15 11:07:20 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-04-15 11:07:20 +0200 |
commit | 0bdc44826d83d048015a601d25a5cf337cc0c961 (patch) | |
tree | 1b4ceb008771f67d07b1434e49d720dba72a4e0b /gulpfile.js | |
parent | d03fc04f6148b2032de3a6d9c862bc7df79683ff (diff) | |
download | fosdem-2021-minimalism-presentation-0bdc44826d83d048015a601d25a5cf337cc0c961.tar fosdem-2021-minimalism-presentation-0bdc44826d83d048015a601d25a5cf337cc0c961.tar.gz |
unify all markdown tests into one file
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gulpfile.js b/gulpfile.js index ae417a4..682ee90 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -81,6 +81,15 @@ gulp.task('css', gulp.parallel('css-themes', 'css-core')) gulp.task('test-qunit', function() { + let serverConfig = { + root, + port: 8009, + host: '0.0.0.0', + name: 'test-server' + } + + connect.server( serverConfig ) + let testFiles = glob.sync('test/*.html' ) let totalTests = 0; @@ -89,7 +98,7 @@ gulp.task('test-qunit', function() { let tests = Promise.all( testFiles.map( filename => { return new Promise( ( resolve, reject ) => { runQunitPuppeteer({ - targetUrl: `file://${path.join(__dirname, filename)}`, + targetUrl: `http://${serverConfig.host}:${serverConfig.port}/${filename}`, timeout: 20000, redirectConsole: false, puppeteerArgs: ['--allow-file-access-from-files'] @@ -129,6 +138,9 @@ gulp.task('test-qunit', function() { } ) .catch( () => { reject(); + } ) + .finally( () => { + connect.serverClose(); } ); } ); |