Skip to content

Commit

Permalink
Remove even more extraneous code
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmire committed Nov 3, 2023
1 parent b758921 commit afd04a6
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 298 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@metamask/utils": "^8.2.0",
"execa": "^5.1.1"
},
"devDependencies": {
Expand Down
5 changes: 0 additions & 5 deletions src/logging-utils.ts

This file was deleted.

63 changes: 0 additions & 63 deletions src/misc-utils.test.ts

This file was deleted.

27 changes: 0 additions & 27 deletions src/misc-utils.ts

This file was deleted.

33 changes: 0 additions & 33 deletions tests/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { createSandbox } from '@metamask/utils/node';
import type {
ExecaChildProcess,
Options as ExecaOptions,
Expand All @@ -7,14 +6,6 @@ import type {
import { mock } from 'jest-mock-extended';
import { inspect, isDeepStrictEqual } from 'util';

import { createModuleLogger, projectLogger } from '../src/logging-utils';

const { withinSandbox } = createSandbox('module-lint-tests');

export const log = createModuleLogger(projectLogger, 'tests');

export { withinSandbox };

/**
* `execa` can be called multiple ways. This is the way that we use it.
*/
Expand All @@ -24,30 +15,6 @@ export type PrimaryExecaFunction = (
options?: ExecaOptions | undefined,
) => ExecaChildProcess;

/**
* Uses Jest's fake timers to fake Date only.
*/
export function fakeDateOnly() {
jest.useFakeTimers({
doNotFake: [
'hrtime',
'nextTick',
'performance',
'queueMicrotask',
'requestAnimationFrame',
'cancelAnimationFrame',
'requestIdleCallback',
'cancelIdleCallback',
'setImmediate',
'clearImmediate',
'setInterval',
'clearInterval',
'setTimeout',
'clearTimeout',
],
});
}

/**
* Builds an object that represents a successful result returned by `execa`.
* This kind of object is usually a bit cumbersome to build because it's a
Expand Down
Loading

0 comments on commit afd04a6

Please sign in to comment.