Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions src/crx.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use strict";

var fs = require("fs");
var path = require("path");
var join = path.join;
var crypto = require("crypto");
Expand Down Expand Up @@ -84,28 +83,6 @@ class ChromeExtension {
});
}

/**
* Writes data into the extension workable directory.
*
* @deprecated
* @param {string} path
* @param {*} data
* @returns {Promise}
*/
writeFile (path, data) {
var absPath = join(this.path, path);

/* istanbul ignore next */
return new Promise(function(resolve, reject) {
fs.writeFile(absPath, data, function(err) {
if (err) {
return reject(err);
}

resolve();
});
});
}

/**
* Generates a public key.
Expand Down
4 changes: 1 addition & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ test('#writeFile', function(t){

var crx = newCrx();

crx.writeFile('/tmp/crx', new Error('')).catch(function(err){
t.ok(err);
});
t.throws(() => crx.writeFile('/tmp/crx'));
});

test('#loadContents', function(t){
Expand Down