MCPcopy
hub / github.com/dropzone/dropzone / getMockFile

Function getMockFile

test/test.js:4–16  ·  view source on GitHub ↗
(
    type = "text/html",
    filename = "test file name",
    contents = ["file contents"]
  )

Source from the content-addressed store, hash-verified

2
3describe("Dropzone", function () {
4 let getMockFile = (
5 type = "text/html",
6 filename = "test file name",
7 contents = ["file contents"]
8 ) => {
9 let file = new File(contents, filename, { type: type });
10 file.status = Dropzone.ADDED;
11 file.accepted = true;
12 file.upload = {
13 filename: filename,
14 };
15 return file;
16 };
17
18 let xhr = null;
19 beforeEach(() => (xhr = sinon.useFakeXMLHttpRequest()));

Callers 1

test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…