1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00

Remove duplicate test (#5687)

This commit is contained in:
Marcos Casagrande 2020-05-21 03:40:43 +02:00 committed by GitHub
parent 47b089ffa8
commit 11e3d70c85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,27 +128,6 @@ test("Data is written to correct rid", async function testCorrectWriteUsingRid()
assertEquals(decoder.decode(data), "hello world"); assertEquals(decoder.decode(data), "hello world");
}); });
test("Data is written to correct rid", async function testCorrectWriteUsingRid() {
const tempFile: string = await Deno.makeTempFile();
const file: Deno.File = await Deno.open(tempFile, {
create: true,
write: true,
read: true,
});
await new Promise((resolve, reject) => {
writeFile(file.rid, "hello world", (err) => {
if (err) return reject(err);
resolve();
});
});
Deno.close(file.rid);
const data = await Deno.readFile(tempFile);
await Deno.remove(tempFile);
assertEquals(decoder.decode(data), "hello world");
});
test("Data is written to correct file", async function testCorrectWriteUsingPath() { test("Data is written to correct file", async function testCorrectWriteUsingPath() {
const res = await new Promise((resolve) => { const res = await new Promise((resolve) => {
writeFile("_fs_writeFile_test_file.txt", "hello world", resolve); writeFile("_fs_writeFile_test_file.txt", "hello world", resolve);