Skip to content

Commit b8f8fb8

Browse files
Fix tests
1 parent db61662 commit b8f8fb8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/oceans/models/guide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import turtleImage from '@public/images/turtle-large.png';
55
import seahorseImage from '@public/images/seahorse-large.png';
66
import trashBottleImage from '@public/images/bottle-large.png';
77
import trashCanImage from '@public/images/can-large.png';
8-
import * as I18n from '../i18n';
8+
import I18n from '../i18n';
99

1010
const imageStyleOverrides = {
1111
turtle: {bottom: '1%', left: '6%'},

test/unit/oceans/ui.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import helpers from '@ml/oceans/helpers';
1919
import {setState, getState, resetState} from '@ml/oceans/state';
2020
import {AppMode, Modes} from '@ml/oceans/constants';
2121
import colors from '@ml/oceans/colors';
22-
import * as I18n from '@ml/oceans/i18n';
22+
import I18n from '@ml/oceans/i18n';
2323

2424
const DEFAULT_PROPS = {
2525
// radiumConfig.userAgent is required because our unit tests run in the "node" testEnvironment
@@ -97,7 +97,7 @@ describe('ConfirmationDialog', () => {
9797
let onYesClickSpy, onNoClickSpy;
9898

9999
beforeAll(() => {
100-
I18n.init();
100+
I18n.initI18n();
101101
});
102102

103103
beforeEach(() => {
@@ -142,7 +142,7 @@ describe('Words', () => {
142142
});
143143

144144
it('selects the set of words based on the current appMode', () => {
145-
I18n.init();
145+
I18n.initI18n();
146146
const appMode = AppMode.FishShort;
147147
setState({appMode});
148148
const wrapper = shallow(<Words {...DEFAULT_PROPS} />);
@@ -170,7 +170,7 @@ describe('Words', () => {
170170
describe('onChangeWord', () => {
171171
let toModeStub;
172172
beforeAll(() => {
173-
I18n.init();
173+
I18n.initI18n();
174174
});
175175

176176
beforeEach(() => {
@@ -222,7 +222,7 @@ describe('Train', () => {
222222
let classifyFishStub;
223223

224224
beforeAll(() => {
225-
I18n.init();
225+
I18n.initI18n();
226226
});
227227

228228
beforeEach(() => {
@@ -348,7 +348,7 @@ describe('Train', () => {
348348

349349
describe('Predict', () => {
350350
beforeAll(() => {
351-
I18n.init();
351+
I18n.initI18n();
352352
});
353353

354354
afterEach(() => {
@@ -521,7 +521,7 @@ describe('Pond', () => {
521521
let toModeStub;
522522

523523
beforeAll(() => {
524-
I18n.init();
524+
I18n.initI18n();
525525
});
526526

527527
beforeEach(() => {

0 commit comments

Comments
 (0)