How to use the jasmine function in jasmine

To help you get started, we’ve selected a few jasmine 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 Palindrom / JSONPatcherProxy / jasmine-run.js View on Github external
import glob from 'glob';
import Jasmine from 'jasmine';

const jasmine = new Jasmine();

const pattern = process.argv[2] || 'test/spec/*Spec.js';

jasmine.loadConfig({
    random: false,
    stopSpecOnExpectationFailure: false
});
// Load your specs
glob(pattern, function (er, files) {
    Promise.all(
        files
            // Use relative paths
            .map(f => f.replace(/^([^\/])/, './$1'))
            .map(f => import(f)
                .catch(e => {
                    console.error('** Error loading ' + f + ': ');
github seanpmaxwell / express-generator-typescript / sample-output / express-gen-ts / spec / index.ts View on Github external
name: 'testFile',
        alias: 'f',
        type: String,
    },
]);

// Set the env file
const result2 = dotenv.config({
    path: `./env/test.env`,
});
if (result2.error) {
    throw result2.error;
}

// Init Jasmine
const jasmine = new Jasmine(null);

// Set location of test files
jasmine.loadConfig({
    random: true,
    spec_dir: 'spec',
    spec_files: [
        './**/*.spec.ts',
    ],
    stopSpecOnExpectationFailure: false,
});

// On complete callback function
jasmine.onComplete((passed: boolean) => {
    if (passed) {
        logger.info('All tests have passed :)');
    } else {
github AbdullahAli / node-stream-to-mongo-db / src / spec / support / run.js View on Github external
import Jasmine from 'jasmine'; // eslint-disable-line

const jas = new Jasmine();
jas.loadConfigFile('src/spec/support/jasmine.json');
jas.execute();
github svgdotjs / svg.js / spec / run.js View on Github external
import Jasmine from 'jasmine'
import svgdom from 'svgdom'

import { buildCanvas, buildFixtures, clear } from './helpers.js'
import { registerWindow } from '../src/main.js'

const jasmine = new Jasmine()

//jasmine.loadConfigFile('spec/support/jasmine.json')

jasmine.loadConfig({
  "spec_dir": "spec/spec",
  "spec_files": [
    "types/*.js",
    // "!(helpers).js"
  ],
  "helpers": [
    // "helpers.js"
  ]
})

jasmine.jasmine.currentEnv_.beforeEach(() => {
  let win = /*new*/ svgdom
github seanpmaxwell / express-generator-typescript / express-generator-typescript / lib / auth-proj / spec / index.ts View on Github external
import find from 'find';
import Jasmine from 'jasmine';
import commandLineArgs from 'command-line-args';
import { logger } from '@shared';

// Setup command line options
const options = commandLineArgs([
    {
        name: 'testFile',
        alias: 'f',
        type: String,
    },
]);

// Init Jasmine
const jasmine = new Jasmine(null);

// Set location of test files
jasmine.loadConfig({
    random: true,
    spec_dir: 'spec',
    spec_files: [
        './**/*.spec.ts',
    ],
    stopSpecOnExpectationFailure: false,
});

// On complete callback function
jasmine.onComplete((passed: boolean) => {
    if (passed) {
        logger.info('All tests have passed :)');
    } else {
github hypery2k / nativescript-urlhandler / test / spec / run.js View on Github external
import Jasmine from 'jasmine';
import jasmineReporters from 'jasmine-reporters';
var jasmine = new Jasmine();
var junitReporter = new jasmineReporters.JUnitXmlReporter({
    savePath: 'target/junit-report',
    consolidateAll: false
});
jasmine.loadConfigFile('test/spec/support/jasmine.json');
jasmine.addReporter(junitReporter);
jasmine.execute();
github Fitbit / webpack-cluster / jasmine.js View on Github external
import Jasmine from 'jasmine';
import {
    SpecReporter
} from 'jasmine-spec-reporter';

const jasmine = new Jasmine();

jasmine.env.clearReporters();
jasmine.addReporter(new SpecReporter({
    spec: {
        displayPending: true
    }
}));
jasmine.loadConfigFile('./jasmine.json');
jasmine.execute();
github jbellsey / redux-model-utils / spec / _runTests.js View on Github external
import Jasmine from 'jasmine';

let jasmine = new Jasmine();
jasmine.loadConfigFile('./spec/support/jasmine.json');
jasmine.execute();
github Fitbit / webpack-config / jasmine.js View on Github external
import Jasmine from 'jasmine';
import {
    SpecReporter
} from 'jasmine-spec-reporter';

const jasmine = new Jasmine();

jasmine.env.clearReporters();
jasmine.addReporter(new SpecReporter({
    spec: {
        displayPending: true
    }
}));
jasmine.loadConfigFile('./jasmine.json');
jasmine.execute();
github Foundry376 / Mailspring / packages / local-sync / src / new-message-processor / spec / run.js View on Github external
import Jasmine from 'jasmine'

const jasmine = new Jasmine()
jasmine.loadConfigFile('spec/support/jasmine.json')
jasmine.execute()