Upgrade to Chai 5.x (#10732)
* remove chai-string plugin * upgrade chai and sinon-chai * update chai imports * migrate badge-maker tests to ESM
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import chai from 'chai'
|
||||
import { expect, use } from 'chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import jsonPath from './json-path.js'
|
||||
const { expect } = chai
|
||||
chai.use(chaiAsPromised)
|
||||
use(chaiAsPromised)
|
||||
|
||||
describe('JSON Path service factory', function () {
|
||||
describe('fetch()', function () {
|
||||
|
||||
@@ -114,10 +114,11 @@ describe('Github token acceptor', function () {
|
||||
const res = await got.post(`${baseUrl}/github-auth/done`, {
|
||||
body: form,
|
||||
})
|
||||
expect(res.body).to.startWith(
|
||||
'<p>Shields.io has received your app-specific GitHub user token.',
|
||||
)
|
||||
|
||||
expect(
|
||||
res.body.startsWith(
|
||||
'<p>Shields.io has received your app-specific GitHub user token.',
|
||||
),
|
||||
).to.be.true
|
||||
expect(onTokenAccepted).to.have.been.calledWith(fakeAccessToken)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import chai from 'chai'
|
||||
import { expect, use } from 'chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import PackagistDependencyVersion from './packagist-dependency-version.service.js'
|
||||
const { expect } = chai
|
||||
chai.use(chaiAsPromised)
|
||||
use(chaiAsPromised)
|
||||
|
||||
describe('PackagistDependencyVersion', function () {
|
||||
const fullPackagistJson = {
|
||||
|
||||
Reference in New Issue
Block a user