0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

Remove unnecessary async keyword in test file (#1507)

This commit is contained in:
JaePil Jung 2019-01-13 23:39:23 +09:00 committed by Ryan Dahl
parent 37e3db00a2
commit 02792d58d4
3 changed files with 7 additions and 7 deletions

View file

@ -1,14 +1,14 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test, assert, assertEqual } from "./test_util.ts";
test(async function blobString() {
test(function blobString() {
const b1 = new Blob(["Hello World"]);
const str = "Test";
const b2 = new Blob([b1, str]);
assertEqual(b2.size, b1.size + str.length);
});
test(async function blobBuffer() {
test(function blobBuffer() {
const buffer = new ArrayBuffer(12);
const u8 = new Uint8Array(buffer);
const f1 = new Float32Array(buffer);
@ -18,7 +18,7 @@ test(async function blobBuffer() {
assertEqual(b2.size, 3 * u8.length);
});
test(async function blobSlice() {
test(function blobSlice() {
const blob = new Blob(["Deno", "Foo"]);
const b1 = blob.slice(0, 3, "Text/HTML");
assert(b1 instanceof Blob);

View file

@ -2,7 +2,7 @@
import { test, testPerm, assert, assertEqual } from "./test_util.ts";
import * as deno from "deno";
testPerm({ env: true }, async function envSuccess() {
testPerm({ env: true }, function envSuccess() {
const env = deno.env();
assert(env !== null);
env.test_var = "Hello World";
@ -10,7 +10,7 @@ testPerm({ env: true }, async function envSuccess() {
assertEqual(env.test_var, newEnv.test_var);
});
test(async function envFailure() {
test(function envFailure() {
let caughtError = false;
try {
const env = deno.env();

View file

@ -3,7 +3,7 @@ import { test, testPerm, assert, assertEqual } from "./test_util.ts";
import { run, DenoError, ErrorKind } from "deno";
import * as deno from "deno";
test(async function runPermissions() {
test(function runPermissions() {
let caughtError = false;
try {
deno.run({ args: ["python", "-c", "print('hello world')"] });
@ -52,7 +52,7 @@ testPerm({ run: true }, async function runCommandFailedWithSignal() {
p.close();
});
testPerm({ run: true }, async function runNotFound() {
testPerm({ run: true }, function runNotFound() {
let error;
try {
run({ args: ["this file hopefully doesn't exist"] });