**~~ NOTE: This is a Stage 0 proposal. ~~**
This proposal has been moved to https://github.com/jeffmo/es-class-properties.
Please direct all future feedback to that repo in the form of directed issues.
{ | |
type: "Program", | |
children: [ | |
{ | |
type: "MultiLineComment", | |
children: [ | |
{ | |
type: "MultiLineCommentStartToken", | |
value: "/*", | |
loc: { |
**~~ NOTE: This is a Stage 0 proposal. ~~**
Please direct all future feedback to that repo in the form of directed issues.
/** @jsx React.DOM */ | |
jest.dontMock('../LanguageSelection'); | |
jest.dontMock('../../store'); | |
var React; | |
var TestUtils; | |
var LanguageSelection; | |
var underscore = require('underscore'); | |
console.log(underscore); |
jest.dontMock('../example'); | |
describe('example', function() { | |
it('does stuff', function() { | |
var underscore = require('underscore'); | |
console.log('underscore', underscore.toString()); | |
}); | |
}); |
jest "/test.js" | |
Using Jest CLI v0.1.5 | |
Found 1 matching tests... | |
PASS __tests__/test.js (0.012s) | |
0/1 tests failed | |
Run time: 1.08s |
describe('This is a test', function() { | |
it('is only a test', function() { | |
var SomeEmitter = require('../SomeEmitter'); | |
var emitter = new SomeEmitter; | |
emitter.on('foo').emit('bar'); | |
expect(emitter.on).toBeCalledWith('foo'); | |
expect(emitter.emit).toBeCalledWith('bar'); | |
}); |
describe('This is a test', function() { | |
it('is only a test', function() { | |
var SomeEmitter = require('../SomeEmitter'); | |
var emitter = new SomeEmitter; | |
emitter.on('foo').emit('bar'); | |
expect(emitter.on).toBeCalledWith('foo'); | |
expect(emitter.emit).toBeCalledWith('bar'); | |
}); |
// SomeEmitter.js | |
function SomeEmitter() {} | |
SomeEmitter.prototype.on = function() {}; | |
SomeEmitter.prototype.emit = function() {}; | |
module.exports = SomeEmitter; |
module.exports = function() { console.log('hai!'); }; |