From 3bbd5f72e40943d390c2b6e280ad055dcc641b01 Mon Sep 17 00:00:00 2001 From: William Durand Date: Wed, 29 May 2019 14:53:20 +0200 Subject: [PATCH] Fix test suite (#8101) --- .travis.yml | 6 +----- tests/unit/amo/components/TestSearchResult.js | 6 +++--- tests/unit/core/i18n/test_utils.js | 5 ++++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 15aabace09..170f5194d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ _aliases: - &node-next # This is the next NodeJS version we will support. language: node_js - node_js: '11' + node_js: '12' before_install: npm install -g yarn services: - docker @@ -30,10 +30,6 @@ script: FORCE_COLOR=0 yarn $COMMAND # See: https://github.com/mozilla/addons-frontend/issues/3034 install: yarn install --pure-lockfile -matrix: - allow_failures: - - node_js: '11' - jobs: include: # Test the build process. diff --git a/tests/unit/amo/components/TestSearchResult.js b/tests/unit/amo/components/TestSearchResult.js index d43e8bd279..d29b72fcb3 100644 --- a/tests/unit/amo/components/TestSearchResult.js +++ b/tests/unit/amo/components/TestSearchResult.js @@ -100,9 +100,9 @@ describe(__filename, () => { it('localises the user count', () => { const root = render({ lang: 'fr' }); - // `\xa0` is a non-breaking space. - // See: https://github.com/airbnb/enzyme/issues/1349 - expect(root.find('.SearchResult-users-text')).toIncludeText('5\xa0253'); + // `\u202F` is a narrow non-breaking space, see: + // https://www.fileformat.info/info/unicode/char/202f/index.htm + expect(root.find('.SearchResult-users-text')).toIncludeText('5\u202F253'); }); it('renders the user count as singular', () => { diff --git a/tests/unit/core/i18n/test_utils.js b/tests/unit/core/i18n/test_utils.js index 0594bf4400..68063f35a8 100644 --- a/tests/unit/core/i18n/test_utils.js +++ b/tests/unit/core/i18n/test_utils.js @@ -490,7 +490,10 @@ describe(__filename, () => { const i18n = utils.makeI18n({}, 'fr', FakeJed, { _Intl: {} }); const toLocaleStringSpy = sinon.spy(Number.prototype, 'toLocaleString'); const number = 12345; - expect(i18n.formatNumber(number)).toEqual('12 345'); + + // `\u202F` is a narrow non-breaking space, see: + // https://www.fileformat.info/info/unicode/char/202f/index.htm + expect(i18n.formatNumber(number)).toEqual('12\u202F345'); sinon.assert.calledWith(toLocaleStringSpy, 'fr'); sinon.assert.notCalled(numberFormatSpy); });