Skip to content

Commit

Permalink
Update test case to have an end to end one
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Parisot committed Feb 15, 2018
1 parent 86db290 commit b13bdf2
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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);
});

0 comments on commit b13bdf2

Please sign in to comment.