1 | module.exports = {
|
---|
2 | /**
|
---|
3 | * A set of globs passed to the glob package that qualify typescript files for testing.
|
---|
4 | */
|
---|
5 | include: ["assembly/__tests__/**/*.spec.ts"],
|
---|
6 | /**
|
---|
7 | * A set of globs passed to the glob package that quality files to be added to each test.
|
---|
8 | */
|
---|
9 | add: ["assembly/__tests__/**/*.include.ts"],
|
---|
10 | /**
|
---|
11 | * All the compiler flags needed for this test suite. Make sure that a binary file is output.
|
---|
12 | */
|
---|
13 | flags: {
|
---|
14 | /** To output a wat file, uncomment the following line. */
|
---|
15 | // "--textFile": ["output.wat"],
|
---|
16 | /** A runtime must be provided here. */
|
---|
17 | "--runtime": ["full"], // Acceptable values are: full, half, stub (arena), and none
|
---|
18 | },
|
---|
19 | /**
|
---|
20 | * A set of regexp that will disclude source files from testing.
|
---|
21 | */
|
---|
22 | disclude: [/node_modules/],
|
---|
23 | /**
|
---|
24 | * Add your required AssemblyScript imports here.
|
---|
25 | */
|
---|
26 | imports(memory, createImports, instantiateSync, binary) {
|
---|
27 | let instance; // Imports can reference this
|
---|
28 | const myImports = {
|
---|
29 | // put your web assembly imports here, and return the module
|
---|
30 | };
|
---|
31 | instance = instantiateSync(binary, createImports(myImports));
|
---|
32 | return instance;
|
---|
33 | },
|
---|
34 | /**
|
---|
35 | * Add a custom reporter here if you want one. The following example is in typescript.
|
---|
36 | *
|
---|
37 | * @example
|
---|
38 | * import { TestReporter, TestGroup, TestResult, TestContext } from "as-pect";
|
---|
39 | *
|
---|
40 | * export class CustomReporter extends TestReporter {
|
---|
41 | * // implement each abstract method here
|
---|
42 | * public abstract onStart(suite: TestContext): void;
|
---|
43 | * public abstract onGroupStart(group: TestGroup): void;
|
---|
44 | * public abstract onGroupFinish(group: TestGroup): void;
|
---|
45 | * public abstract onTestStart(group: TestGroup, result: TestResult): void;
|
---|
46 | * public abstract onTestFinish(group: TestGroup, result: TestResult): void;
|
---|
47 | * public abstract onFinish(suite: TestContext): void;
|
---|
48 | * }
|
---|
49 | */
|
---|
50 | // reporter: new CustomReporter(),
|
---|
51 | /**
|
---|
52 | * Specify if the binary wasm file should be written to the file system.
|
---|
53 | */
|
---|
54 | outputBinary: false,
|
---|
55 | };
|
---|