2019-02-10 18:49:48 -05:00
|
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2019-03-06 16:39:50 -05:00
|
|
|
import { test } from "../testing/mod.ts";
|
2019-03-06 19:42:24 -05:00
|
|
|
import { assertEquals } from "../testing/asserts.ts";
|
2019-02-10 18:49:48 -05:00
|
|
|
import { isFormFile } from "./formfile.ts";
|
|
|
|
|
|
|
|
test(function multipartIsFormFile() {
|
2019-03-06 19:42:24 -05:00
|
|
|
assertEquals(
|
2019-02-10 18:49:48 -05:00
|
|
|
isFormFile({
|
|
|
|
filename: "foo",
|
|
|
|
type: "application/json"
|
|
|
|
}),
|
|
|
|
true
|
|
|
|
);
|
2019-03-06 19:42:24 -05:00
|
|
|
assertEquals(
|
2019-02-10 18:49:48 -05:00
|
|
|
isFormFile({
|
|
|
|
filename: "foo"
|
|
|
|
}),
|
|
|
|
false
|
|
|
|
);
|
|
|
|
});
|