mirror of
https://github.com/denoland/deno.git
synced 2025-08-18 01:30:23 +00:00
Fix eslint warnings (#2151)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
This commit is contained in:
parent
6cded14bdf
commit
9dfebbc949
75 changed files with 1110 additions and 931 deletions
|
@ -22,12 +22,12 @@ function assertSameContent(files: FileInfo[]): void {
|
|||
assertEquals(counter, 2);
|
||||
}
|
||||
|
||||
testPerm({ read: true }, function readDirSyncSuccess() {
|
||||
testPerm({ read: true }, function readDirSyncSuccess(): void {
|
||||
const files = Deno.readDirSync("tests/");
|
||||
assertSameContent(files);
|
||||
});
|
||||
|
||||
testPerm({ read: false }, function readDirSyncPerm() {
|
||||
testPerm({ read: false }, function readDirSyncPerm(): void {
|
||||
let caughtError = false;
|
||||
try {
|
||||
Deno.readDirSync("tests/");
|
||||
|
@ -39,7 +39,7 @@ testPerm({ read: false }, function readDirSyncPerm() {
|
|||
assert(caughtError);
|
||||
});
|
||||
|
||||
testPerm({ read: true }, function readDirSyncNotDir() {
|
||||
testPerm({ read: true }, function readDirSyncNotDir(): void {
|
||||
let caughtError = false;
|
||||
let src;
|
||||
|
||||
|
@ -53,7 +53,7 @@ testPerm({ read: true }, function readDirSyncNotDir() {
|
|||
assertEquals(src, undefined);
|
||||
});
|
||||
|
||||
testPerm({ read: true }, function readDirSyncNotFound() {
|
||||
testPerm({ read: true }, function readDirSyncNotFound(): void {
|
||||
let caughtError = false;
|
||||
let src;
|
||||
|
||||
|
@ -67,12 +67,12 @@ testPerm({ read: true }, function readDirSyncNotFound() {
|
|||
assertEquals(src, undefined);
|
||||
});
|
||||
|
||||
testPerm({ read: true }, async function readDirSuccess() {
|
||||
testPerm({ read: true }, async function readDirSuccess(): Promise<void> {
|
||||
const files = await Deno.readDir("tests/");
|
||||
assertSameContent(files);
|
||||
});
|
||||
|
||||
testPerm({ read: false }, async function readDirPerm() {
|
||||
testPerm({ read: false }, async function readDirPerm(): Promise<void> {
|
||||
let caughtError = false;
|
||||
try {
|
||||
await Deno.readDir("tests/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue