Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Jest test to verify UMD API-forwarding for scheduling package #13532

Merged
merged 4 commits into from
Sep 1, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions packages/react-scheduler/src/__tests__/SchedulingUMDBundle-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @jest-environment node
*/
'use strict';

describe('Scheduling UMD bundle', () => {
beforeEach(() => jest.resetModules());

it('should define the same scheduling API', () => {
const umdAPI = require('../../npm/umd/react-scheduler');
const cjsAPI = require('../../index');
expect(Object.keys(umdAPI).sort()).toEqual(Object.keys(cjsAPI).sort());
});

it('should define the same tracking API', () => {
const umdAPI = require('../../npm/umd/react-scheduler-tracking');
const cjsAPI = require('../../tracking');
expect(Object.keys(umdAPI).sort()).toEqual(Object.keys(cjsAPI).sort());
});
});