UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

60 lines (49 loc) 1.42 kB
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); function _chai() { const data = require("chai"); _chai = function () { return data; }; return data; } function _child_process() { const data = require("child_process"); _child_process = function () { return data; }; return data; } function path() { const data = _interopRequireWildcard(require("path")); path = function () { return data; }; return data; } describe('worker', () => { // TODO: fix this test, the worker now do a different process than before it.skip('should throw an error for a mismatch tester interface', done => { const child = (0, _child_process().fork)(path().join(__dirname, '..', '..', 'dist', 'specs-runner', 'worker.js'), { // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX! silent: false, env: { __impl__: '', __specs__: '', __tester__: path().join(__dirname, '../../', 'fixtures', 'invalid-tester.js'), __testerId__: 'myScope/my-component' } }); process.on('exit', () => { child.kill('SIGKILL'); }); child.on('message', ({ type, payload }) => { (0, _chai().expect)(type).to.equal('error'); (0, _chai().expect)(payload).to.equal('"myScope/my-component" doesn\'t have a valid tester interface'); done(); }); }); });