mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(): React Build Scripts (#19501)
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
14
packages/react-router/src/utils/__tests__/dev.spec.ts
Normal file
14
packages/react-router/src/utils/__tests__/dev.spec.ts
Normal 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()
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user