me sale este error al ejecutar mis pruebas.
import { Meteor } from 'meteor/meteor';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactTestUtils from 'react-addons-test-utils';
import { mount } from 'enzyme';
import { chai, assert } from 'meteor/practicalmeteor:chai';
import { Factory } from 'meteor/dburles:factory';
import faker from 'faker';
import StubCollections from 'meteor/hwillson:stub-collections';
import {Button, FormGroup, ControlLabel, FormControl, HelpBlock,
ButtonToolbar, Checkbox, Radio, Glyphicon} from 'react-bootstrap';
import MainApp from '/imports/ui/MainApp.jsx';
import {Companies} from '/imports/api/companies.js';
import {
insert,
} from '/imports/api/companies.js';
describe('Server', () => {
Factory.define('user', Companies, {
firstName: () => 'Daniel',
lastName: () => 'Peña',
orgType: () => 'non-profit',
});
if (Meteor.isServer)
it('Se insertan los datos', () => {
const users = Factory.create('user');
StubCollections.stub(Companies);
Companies.insert({ users });
assert.equal(Companies.find().count(), 1);
StubCollections.restore();
});
it('No se insertan los datos al no seleccionar el TOS', () => {
const main = mount(<MainApp/>);
const users = Factory.create('user');
StubCollections.stub(Companies);
main.find('div.checkbox').simulate('change', {
target: { checked: false }
});
Companies.insert({ users });
assert.equal(Companies.find().count(), 0);
StubCollections.restore();
});
return;
});