From b13bdf20741dcb66c7ec99e85df45d0f81bc71ad Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Thu, 15 Feb 2018 12:55:53 +0000 Subject: [PATCH] Update test case to have an end to end one --- test/index.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/test/index.js b/test/index.js index e53ff47..36e1324 100644 --- a/test/index.js +++ b/test/index.js @@ -29,9 +29,7 @@ test('#ChromeExtension', function(t){ test('#load', function(t){ t.plan(4); - newCrx().load().then(function(){ - t.pass(); - }); + newCrx().load().then(t.pass); var fileList = [ 'test/myFirstExtension/manifest.json', @@ -153,3 +151,17 @@ test('#generateAppId', function(t) { }) .catch(t.error.bind(t)); }); + +test('end to end', function (t) { + var crx = newCrx(); + + crx.load() + .then(crx => crx.pack()) + .then(crxBuffer => { + fs.writeFile('build.crx', crxBuffer, t.error); + + const xmlBuffer = crx.generateUpdateXML(); + fs.writeFile('update.xml', xmlBuffer, t.error); + }) + .then(t.end); +});