1.2.1 • Published 4 years ago

@pencil.js/test-environment v1.2.1

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

Test environment for Pencil.js

This package setup a proper browser environment to test Pencil.js in node.

It's compatible with all existing test-runners (AVA, Jest, Mocha ...)

Installation

npm install --save-dev @pencil.js/test-environment

Usage

Just import the package, it will edit the global scope with required variables.

import "@pencil.js/test-environment";

Or if your test-runner allows it, set it as require dependency in the configuration.

Example

import "@pencil.js/test-environment";
import Pencil from "pencil.js";
import test from "ava";

test("My test", (t) => {
    const scene = new Pencil.Scene();
    t.true(scene.isScene);
});
1.2.1

4 years ago

1.2.0

5 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago