mirror of
https://github.com/denoland/deno.git
synced 2025-07-30 08:34:35 +00:00
Remove unnecessary async keyword in test file (#1507)
This commit is contained in:
parent
37e3db00a2
commit
02792d58d4
3 changed files with 7 additions and 7 deletions
|
@ -1,14 +1,14 @@
|
||||||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||||
import { test, assert, assertEqual } from "./test_util.ts";
|
import { test, assert, assertEqual } from "./test_util.ts";
|
||||||
|
|
||||||
test(async function blobString() {
|
test(function blobString() {
|
||||||
const b1 = new Blob(["Hello World"]);
|
const b1 = new Blob(["Hello World"]);
|
||||||
const str = "Test";
|
const str = "Test";
|
||||||
const b2 = new Blob([b1, str]);
|
const b2 = new Blob([b1, str]);
|
||||||
assertEqual(b2.size, b1.size + str.length);
|
assertEqual(b2.size, b1.size + str.length);
|
||||||
});
|
});
|
||||||
|
|
||||||
test(async function blobBuffer() {
|
test(function blobBuffer() {
|
||||||
const buffer = new ArrayBuffer(12);
|
const buffer = new ArrayBuffer(12);
|
||||||
const u8 = new Uint8Array(buffer);
|
const u8 = new Uint8Array(buffer);
|
||||||
const f1 = new Float32Array(buffer);
|
const f1 = new Float32Array(buffer);
|
||||||
|
@ -18,7 +18,7 @@ test(async function blobBuffer() {
|
||||||
assertEqual(b2.size, 3 * u8.length);
|
assertEqual(b2.size, 3 * u8.length);
|
||||||
});
|
});
|
||||||
|
|
||||||
test(async function blobSlice() {
|
test(function blobSlice() {
|
||||||
const blob = new Blob(["Deno", "Foo"]);
|
const blob = new Blob(["Deno", "Foo"]);
|
||||||
const b1 = blob.slice(0, 3, "Text/HTML");
|
const b1 = blob.slice(0, 3, "Text/HTML");
|
||||||
assert(b1 instanceof Blob);
|
assert(b1 instanceof Blob);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { test, testPerm, assert, assertEqual } from "./test_util.ts";
|
import { test, testPerm, assert, assertEqual } from "./test_util.ts";
|
||||||
import * as deno from "deno";
|
import * as deno from "deno";
|
||||||
|
|
||||||
testPerm({ env: true }, async function envSuccess() {
|
testPerm({ env: true }, function envSuccess() {
|
||||||
const env = deno.env();
|
const env = deno.env();
|
||||||
assert(env !== null);
|
assert(env !== null);
|
||||||
env.test_var = "Hello World";
|
env.test_var = "Hello World";
|
||||||
|
@ -10,7 +10,7 @@ testPerm({ env: true }, async function envSuccess() {
|
||||||
assertEqual(env.test_var, newEnv.test_var);
|
assertEqual(env.test_var, newEnv.test_var);
|
||||||
});
|
});
|
||||||
|
|
||||||
test(async function envFailure() {
|
test(function envFailure() {
|
||||||
let caughtError = false;
|
let caughtError = false;
|
||||||
try {
|
try {
|
||||||
const env = deno.env();
|
const env = deno.env();
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { test, testPerm, assert, assertEqual } from "./test_util.ts";
|
||||||
import { run, DenoError, ErrorKind } from "deno";
|
import { run, DenoError, ErrorKind } from "deno";
|
||||||
import * as deno from "deno";
|
import * as deno from "deno";
|
||||||
|
|
||||||
test(async function runPermissions() {
|
test(function runPermissions() {
|
||||||
let caughtError = false;
|
let caughtError = false;
|
||||||
try {
|
try {
|
||||||
deno.run({ args: ["python", "-c", "print('hello world')"] });
|
deno.run({ args: ["python", "-c", "print('hello world')"] });
|
||||||
|
@ -52,7 +52,7 @@ testPerm({ run: true }, async function runCommandFailedWithSignal() {
|
||||||
p.close();
|
p.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
testPerm({ run: true }, async function runNotFound() {
|
testPerm({ run: true }, function runNotFound() {
|
||||||
let error;
|
let error;
|
||||||
try {
|
try {
|
||||||
run({ args: ["this file hopefully doesn't exist"] });
|
run({ args: ["this file hopefully doesn't exist"] });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue