Skip to content

Commit

Permalink
Update test for renamed class
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbeck committed Apr 18, 2024
1 parent fa3aa28 commit b2867f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/all/App.mocha.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
var expect = require('chai').expect;
var App = require('../../src/App').App;
var AppForClient = require('../../src/App').AppForClient;

describe('App._parseInitialData', () => {
it('parses simple json', () => {
var actual = App._parseInitialData('{"foo": "bar"}');
var actual = AppForClient._parseInitialData('{"foo": "bar"}');
expect(actual).to.deep.equal({ foo: 'bar' });
});

it('parses escaped json', () => {
var actual = App._parseInitialData('{"foo": "<\\u0021bar><\\/bar>"}');
var actual = AppForClient._parseInitialData('{"foo": "<\\u0021bar><\\/bar>"}');
expect(actual).to.deep.equal({ foo: '<!bar></bar>' });
});

it('thorws error with context for unexpected tokens', () => {
expect(() => App._parseInitialData('{"foo": b}')).to.throw(
expect(() => AppForClient._parseInitialData('{"foo": b}')).to.throw(
/^Parse failure: Unexpected token/
);
});
Expand Down

0 comments on commit b2867f3

Please sign in to comment.