How to use jest-jasmine2 - 2 common examples

To help you get started, we’ve selected a few jest-jasmine2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github w3tecch / aurelia-typescript-boilerplate / test / karma-bundle.js View on Github external
import 'aurelia-polyfills';
import 'aurelia-loader-webpack';
import {install as installJasmineAsync} from 'jest-jasmine2/jasmine-async';

// enable running Promise-returning tests:
installJasmineAsync(global);

// enable running the same unit tests by using the Jest expect:
installJestExpect();
global.jest = false;

// disable stacktrace limit so we do not loose any error information
Error.stackTraceLimit = Infinity;

// load and run tests:
const testModuleContexts = loadTestModules();
runTests(testModuleContexts);

function loadTestModules() {
  const srcContext = require.context(
    // directory:
    '../src',
github michaelbull / aurelia-typescript-webpack-starter / test / karma-setup.ts View on Github external
import 'aurelia-loader-default';
import { initialize } from 'aurelia-pal-browser';
import 'aurelia-polyfills';
import { install as installJasmineAsync } from 'jest-jasmine2/build/jasmine-async.js';

initialize();
installJasmineAsync(global);

Error.stackTraceLimit = Infinity;

jest-jasmine2

MIT
Latest version published 1 year ago

Package Health Score

82 / 100
Full package analysis