1.0.8 • Published 6 years ago

@test-ui/mocha v1.0.8

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
6 years ago

@test-ui/mocha

Build Status Version

Test-UI support for Mocha.

Setup

npm install @test-ui/mocha

Use

Client-Side

import { IFrameConnectionClient } from '@test-ui/core';
import { MochaTestClient } from '@test-ui/mocha';

// Set the client up
const client = new MochaTestClient({
  // 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 { MochaTestServer } from '@test-ui/mocha';
import mocha from 'mocha';

// Set the server up
let srv = new MochaTestServer(mocha, {
  connection: new IFrameConnectionServer()
});

// Start it
srv.start();

Legal

(c) 2018 LinkedIn

1.0.8

6 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago