@test-ui/qunit
v1.0.11
Published
QUnit support for test-ui
Downloads
7
Readme
@test-ui/qunit
Test-UI support for QUnit.
Setup
npm install @test-ui/qunit
Use
Client-Side
import { IFrameConnectionClient } from '@test-ui/core';
import { QUnitTestClient } from '@test-ui/qunit';
// Set the client up
const client = new QUnitTestClient({
// Make sure to disable the client when it running in a test environment
enabled: config.environment === 'development',
connection: new IFrameConnectionClient({
baseUrl: '/tests',
frame: myIframe // a HTMLIFrameElement
})
});
// Run some tests
client.runModules({ name: /purple/ });
Server-Side
import { IFrameConnectionServer } from '@test-ui/core';
import { QunitTestServer } from '@test-ui/qunit';
import QUnit from 'qunit';
// Set the server up
let srv = new QunitTestServer(QUnit, {
connection: new IFrameConnectionServer()
});
// Start it
srv.start();
Legal
(c) 2018 LinkedIn