mirror of
https://github.com/denoland/deno.git
synced 2024-11-26 16:09:27 -05:00
Remove duplicate test (#5687)
This commit is contained in:
parent
47b089ffa8
commit
11e3d70c85
1 changed files with 0 additions and 21 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue