From eea30867fcd265de7fb0f22c2d7a4cf8909e1bd1 Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Thu, 7 Dec 2017 12:13:48 -0500 Subject: [PATCH] Update tests --- package.json | 2 +- test/snapshots/static.js.md | 9 ++---- test/snapshots/static.js.snap | Bin 407 -> 411 bytes test/static.js | 50 +++++++++++++++++----------------- 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 85aa75a..58c878f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ }, "devDependencies": { "@compositor/logo": "^1.2.2", - "ava": "^0.22.0", + "ava": "^0.24.0", "cxs": "^6.1.0", "isomorphic-fetch": "^2.2.1", "nyc": "^11.2.1", diff --git a/test/snapshots/static.js.md b/test/snapshots/static.js.md index 3e0e952..e6945de 100644 --- a/test/snapshots/static.js.md +++ b/test/snapshots/static.js.md @@ -17,9 +17,8 @@ Generated by [AVA](https://ava.li). > Snapshot 1 `␊ -
␊ +

Hello

␊ -
␊ ␊ ␊ ` @@ -29,9 +28,8 @@ Generated by [AVA](https://ava.li). > Snapshot 1 `␊ -
␊ +

Hello

␊ -
␊ ␊ ␊ ` @@ -41,9 +39,8 @@ Generated by [AVA](https://ava.li). > Snapshot 1 `␊ -
␊ +

Hello

␊ -
␊ ` diff --git a/test/snapshots/static.js.snap b/test/snapshots/static.js.snap index 5e64b44d73612beedce26c25b39565642d627f6e..87e68e679e510c9a8832c1f86584756f4d58e6bc 100644 GIT binary patch delta 288 zcmV+*0pI?Y1DgXPK~_N^Q*L2!b7*gLAa*ed0RWP#s{e2%`Be+7!IO6Jtn`s0JS_n6 zB9%}9^N>n=u4OI@*Ik|5#|RdE2gDl|&2Cqt3pOeZjK$7O>SyQqC#>;Vo`BwiLH8RNt&*OI#4*n(9R<@Cnw)VAIRe3;-bDO zOh*`qH%1{Pu_RHqC^a#;q$oeX#8ycO*U<_qGVfj{iM>ol$=z(tYURLgc1Pw&5wF70ssJ|n=u4OI@*Ik|5#|Rev0>m2@&2Cqt3pOeZjK$7O-g2&LS~AsdVIWNKtO!FI#4LX(9R<@Cnw)VAIRde(FZEA { - x0Static(hello, {}, (err, result) => { - t.is(err, null) - t.is(typeof result, 'object') - t.snapshot(result.html) - t.end() - }) + x0Static(hello, {}) + .then(result => { + t.is(typeof result, 'object') + t.snapshot(result.html) + t.end() + }) }) test.cb('static writes', t => { x0Static(hello, { outDir: 'test/output' - }, (err, result) => { - t.is(err, null) - t.is(typeof result, 'object') - t.snapshot(result.html) - t.end() }) + .then(result => { + t.is(typeof result, 'object') + t.snapshot(result.html) + t.end() + }) }) test.cb('static uses getInitialProps method', t => { - x0Static(withprops, {}, (err, result) => { - t.is(err, null) - t.is(typeof result, 'object') - t.snapshot(result.html) - t.end() - }) + x0Static(withprops, {}) + .then(result => { + t.is(typeof result, 'object') + t.snapshot(result.html) + t.end() + }) }) test.cb('static picks up routes config', t => { @@ -55,12 +55,12 @@ test.cb('static picks up routes config', t => { routes: [ '/' ] - }, (err, result) => { - t.is(err, null) - t.is(typeof result, 'object') - t.snapshot(result.html) - t.end() }) + .then(result => { + t.is(typeof result, 'object') + t.snapshot(result.html) + t.end() + }) }) test.cb('static makes a directory', t => { @@ -70,8 +70,8 @@ test.cb('static makes a directory', t => { x0Static(hello, { outDir: 'test/output' - }, (err, result) => { - t.is(err, null) - t.end() }) + .then(result => { + t.end() + }) })