Rename removeText to removeFile

master
jeromewu 5 years ago
parent 1ff4b79f75
commit 50df652f33
  1. 4
      src/createWorker.js
  2. 2
      tests/FS.test.js

@ -75,7 +75,7 @@ module.exports = (_options = {}) => {
})) }))
); );
const removeText = (path, jobId) => ( const removeFile = (path, jobId) => (
startJob(createJob({ startJob(createJob({
id: jobId, id: jobId,
action: 'FS', action: 'FS',
@ -185,7 +185,7 @@ module.exports = (_options = {}) => {
load, load,
writeText, writeText,
readText, readText,
removeText, removeFile,
FS, FS,
loadLanguage, loadLanguage,
initialize, initialize,

@ -28,7 +28,7 @@ describe('FS', async () => {
await worker.writeText(path, SIMPLE_TEXT); await worker.writeText(path, SIMPLE_TEXT);
setTimeout(async () => { setTimeout(async () => {
const { data } = await worker.readText(path); const { data } = await worker.readText(path);
await worker.removeText(path); await worker.removeFile(path);
expect(data).to.be(SIMPLE_TEXT); expect(data).to.be(SIMPLE_TEXT);
}, 200); }, 200);
}); });

Loading…
Cancel
Save