mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Update linting dependency
This commit is contained in:
@@ -310,6 +310,7 @@ describe('An IdentityProviderFactory', (): void => {
|
||||
expect(use).toHaveBeenCalledTimes(1);
|
||||
const middleware = use.mock.calls[0][0];
|
||||
|
||||
// eslint-disable-next-line jest/unbound-method
|
||||
const oldAccept = ctx.accepts;
|
||||
const next = jest.fn();
|
||||
await expect(middleware(ctx, next)).resolves.toBeUndefined();
|
||||
@@ -325,6 +326,7 @@ describe('An IdentityProviderFactory', (): void => {
|
||||
expect(use).toHaveBeenCalledTimes(1);
|
||||
const middleware = use.mock.calls[0][0];
|
||||
|
||||
// eslint-disable-next-line jest/unbound-method
|
||||
const oldAccept = ctx.accepts;
|
||||
const next = jest.fn();
|
||||
await expect(middleware(ctx, next)).resolves.toBeUndefined();
|
||||
|
||||
@@ -22,8 +22,8 @@ describe('A ClusterManager', (): void => {
|
||||
beforeAll((): void => {
|
||||
Object.assign(mockCluster, {
|
||||
fork: jest.fn().mockImplementation((): any => mockWorker),
|
||||
on: jest.fn().mockImplementation(emitter.on),
|
||||
emit: jest.fn().mockImplementation(emitter.emit),
|
||||
on: jest.fn().mockImplementation(emitter.on.bind(emitter)),
|
||||
emit: jest.fn().mockImplementation(emitter.emit.bind(emitter)),
|
||||
isMaster: true,
|
||||
isWorker: false,
|
||||
});
|
||||
|
||||
@@ -819,7 +819,7 @@ describe('A DataAccessorBasedStore', (): void => {
|
||||
const auxResourceID = { path: `${root}resource.dummy` };
|
||||
accessor.data[resourceID.path] = representation;
|
||||
accessor.data[auxResourceID.path] = representation;
|
||||
const deleteFn = accessor.deleteResource;
|
||||
const deleteFn = accessor.deleteResource.bind(accessor);
|
||||
jest.spyOn(accessor, 'deleteResource')
|
||||
.mockImplementation(async(identifier: ResourceIdentifier): Promise<void> => {
|
||||
if (auxiliaryStrategy.isAuxiliaryIdentifier(identifier)) {
|
||||
@@ -862,6 +862,7 @@ describe('A DataAccessorBasedStore', (): void => {
|
||||
|
||||
it('should rethrow any unexpected errors from validateIdentifier.', async(): Promise<void> => {
|
||||
const resourceID = { path: `${root}resource` };
|
||||
// eslint-disable-next-line jest/unbound-method
|
||||
const originalMetaData = accessor.getMetadata;
|
||||
jest.spyOn(accessor, 'getMetadata').mockImplementation(async(): Promise<any> => {
|
||||
throw new Error('error');
|
||||
|
||||
@@ -33,7 +33,7 @@ describe('A LockingResourceStore', (): void => {
|
||||
}
|
||||
|
||||
const readable = guardedStreamFrom([ 1, 2, 3 ]);
|
||||
const { destroy } = readable;
|
||||
const destroy = readable.destroy.bind(readable);
|
||||
jest.spyOn(readable, 'destroy').mockImplementation((error): any => destroy.call(readable, error));
|
||||
source = {
|
||||
getRepresentation: jest.fn((): any => addOrder('getRepresentation', { data: readable } as Representation)),
|
||||
|
||||
Reference in New Issue
Block a user