Files
shields/services/dynamic/json-path.spec.js
chris48s fb816ecf93 Upgrade to Chai 5.x (#10732)
* remove chai-string plugin

* upgrade chai and sinon-chai

* update chai imports

* migrate badge-maker tests to ESM
2024-12-11 19:28:45 +00:00

20 lines
621 B
JavaScript

import { expect, use } from 'chai'
import chaiAsPromised from 'chai-as-promised'
import jsonPath from './json-path.js'
use(chaiAsPromised)
describe('JSON Path service factory', function () {
describe('fetch()', function () {
it('should throw error if it is not overridden', function () {
class BaseService {}
class JsonPathService extends jsonPath(BaseService) {}
const jsonPathServiceInstance = new JsonPathService()
return expect(jsonPathServiceInstance.fetch({})).to.be.rejectedWith(
Error,
'fetch() function not implemented for JsonPathService',
)
})
})
})