Просмотр исходного кода

Use assert.fail instead of comparing `false` and `true`

GitOrigin-RevId: c6cbaf0a424771cf2a037366fccd790a13d9b1bb
Andrew Rumble 1 год назад
Родитель
Сommit
2c3eed8d96
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      services/web/test/unit/src/Subscription/RecurlyWrapperTests.js

+ 2 - 2
services/web/test/unit/src/Subscription/RecurlyWrapperTests.js

@@ -1,4 +1,4 @@
-const { expect } = require('chai')
+const { assert, expect } = require('chai')
 const sinon = require('sinon')
 const sinon = require('sinon')
 const modulePath = '../../../../app/src/Features/Subscription/RecurlyWrapper'
 const modulePath = '../../../../app/src/Features/Subscription/RecurlyWrapper'
 const SandboxedModule = require('sandboxed-module')
 const SandboxedModule = require('sandboxed-module')
@@ -319,7 +319,7 @@ describe('RecurlyWrapper', function () {
           this.recurlyAccountId,
           this.recurlyAccountId,
           this.newEmail
           this.newEmail
         )
         )
-        expect(false).to.equal(true) // Fail if we don't have an error
+        assert.fail('Expected error not thrown')
       } catch (error) {
       } catch (error) {
         expect(error).to.have.property('message')
         expect(error).to.have.property('message')
         expect(error.message.startsWith('Invalid character')).to.be.true
         expect(error.message.startsWith('Invalid character')).to.be.true