fix(tests/settings): Improve test assertions and update local settings permissions
This commit is contained in:
@@ -15,13 +15,8 @@ tap.test('.fs.fileExistsSync -> should return an accurate boolean', async () =>
|
||||
});
|
||||
|
||||
tap.test('.fs.fileExists -> should resolve or reject a promise', async () => {
|
||||
expect(smartfile.fs.fileExists('./test/testassets/mytest.json')).toBeInstanceOf(Promise);
|
||||
await smartfile.fs.fileExists('./test/testassets/mytest.json');
|
||||
await smartfile.fs.fileExists('./test/testassets/notthere.json').catch((err) => {
|
||||
return expect(err.message).toEqual(
|
||||
"ENOENT: no such file or directory, access './test/testassets/notthere.json'"
|
||||
);
|
||||
});
|
||||
await expect(smartfile.fs.fileExists('./test/testassets/mytest.json')).resolves.toBeTrue();
|
||||
await expect(smartfile.fs.fileExists('./test/testassets/notthere.json')).resolves.toBeFalse();
|
||||
});
|
||||
|
||||
tap.test('.fs.listFoldersSync() -> should get the file type from a string', async () => {
|
||||
|
Reference in New Issue
Block a user