remove tab at end of test

This commit is contained in:
Omar Rizwan 2020-12-19 17:11:59 -08:00
parent 375e91bdd7
commit 9e23fc59fc
2 changed files with 5 additions and 3 deletions

View file

@ -275,7 +275,8 @@ router["/tabs/by-id/*/control"] = {
// see https://developer.chrome.com/extensions/tabs
await browser.tabs[command](tabId);
return {size: stringToUtf8Array(buf).length};
}
},
async truncate({path, size}) { return {}; }
};
router["/tabs/by-title"] = {

5
test.c
View file

@ -15,10 +15,11 @@ int file_contents_equal(char* path, char* contents) {
}
// integration tests
int main() {
int main(int argc, char** argv) {
assert(system("echo about:blank > fs/mnt/tabs/create") == 0);
assert(file_contents_equal("fs/mnt/tabs/last-focused/url", "about:blank"));
assert(system("file fs/mnt/tabs/last-focused/screenshot.png") == 0);
assert(system("echo remove > fs/mnt/tabs/last-focused/control") == 0);
assert(1); printf("Done!\n");
}