Skip to content

Commit

Permalink
Actually remove injected resources from returned files.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Dec 12, 2023
1 parent 4cac9cd commit e030f1a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class BaseApplication {
error = e;
}

for (const dirName of Object.keys(this.resources))
for (const dirName of Object.keys(this.resources.filesystem))
delete environment.root.files[dirName];
files = directoryIntoTree(environment.root, { decodeASCII });
if (error !== null) {
Expand Down
2 changes: 2 additions & 0 deletions test/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh -e

cd $(dirname $0)/yowasp_runtime_test
rm -rf node_modules

npm install
npm run transpile
npm run pack
Expand Down
4 changes: 4 additions & 0 deletions test/yowasp_runtime_test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ if (!(files5['b.txt'] instanceof Uint8Array && files5['b.txt'].length === 1 && f
let files6 = await yowaspRuntimeTest.run([], {'sp.txt': '\r\n\t'});
if (files6['sp.txt'] !== '\r\n\t')
throw 'test 6';

let files7 = await yowaspRuntimeTest.run([]);
if (typeof files7['share'] !== 'undefined')
throw 'test 7';

0 comments on commit e030f1a

Please sign in to comment.