forked from jestjs/jest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowser-test.js
28 lines (24 loc) · 864 Bytes
/
browser-test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable */
var expect = require('../../packages/expect/build-es5/index.js');
var mock = require('../../packages/jest-mock/build-es5/index.js');
var prettyFormat = require('../../packages/pretty-format/build-es5/index.js');
describe('es5 builds in browser', function() {
it('runs assertions', function() {
expect(1).toBe(1);
});
it('runs mocks', function() {
var someMockFunction = mock.fn();
expect(someMockFunction).not.toHaveBeenCalled();
someMockFunction();
expect(someMockFunction).toHaveBeenCalledTimes(1);
});
it('pretty formats a string', function() {
expect(prettyFormat('obj')).toBe('"obj"');
});
});