chore(): React Build Scripts (#19501)

This commit is contained in:
Ely Lucas
2019-10-07 10:37:20 -06:00
committed by GitHub
parent aed2dba5aa
commit 8706ecf9c3
26 changed files with 1629 additions and 1273 deletions

View File

@ -7,7 +7,7 @@ export class LocationHistory {
add(location: HistoryLocation) {
this.locationHistory.push(location);
if(this.locationHistory.length > RESTRICT_SIZE) {
if (this.locationHistory.length > RESTRICT_SIZE) {
this.locationHistory.splice(0, 10);
}
}

View File

@ -0,0 +1,14 @@
import { isDevMode } from '../dev';
describe('isDevMode', () => {
it('by default, should return false since we are in test', () => {
const isDev = isDevMode();
expect(isDev).toBeFalsy();
});
it('when in dev mode, should return true', () => {
process.env.NODE_ENV = 'development';
const isDev = isDevMode();
expect(isDev).toBeTruthy()
});
});