From df6d3c2bf5bdb4accbeb03cfa7a730b1ff18021c Mon Sep 17 00:00:00 2001 From: AlexxNB Date: Thu, 16 Apr 2020 23:08:50 +0300 Subject: [PATCH] break test on pieces in set directory --- tests/index.js | 15 ++------------- tests/set/page_loading.js | 6 ++++++ 2 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 tests/set/page_loading.js diff --git a/tests/index.js b/tests/index.js index b352f1a..c70f2d2 100644 --- a/tests/index.js +++ b/tests/index.js @@ -2,17 +2,9 @@ const tape = require('tape'); const puppeteer = require('puppeteer'); test('e2e test',[ - page_loading + require('./set/page_loading') ]); - - -async function page_loading(t,p){ - await p.goto(`http://localhost:5000`); - t.equal((await p.title()),'Tinro Test Page','Page is loaded'); -} - - function test(name,cbs){ tape(name, async t => { @@ -26,7 +18,4 @@ function test(name,cbs){ t.end(); await browser.close(); }) -} - - - +} \ No newline at end of file diff --git a/tests/set/page_loading.js b/tests/set/page_loading.js new file mode 100644 index 0000000..df1c3dc --- /dev/null +++ b/tests/set/page_loading.js @@ -0,0 +1,6 @@ +module.exports = async function (t,p) { + + await p.goto(`http://localhost:5000`); + t.equal((await p.title()),'Tinro Test Page','Page is loaded'); + +} \ No newline at end of file