Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/pretty-format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@types/react": "^17.0.3",
"@types/react-is": "^17.0.0",
"@types/react-test-renderer": "17.0.2",
"expect": "workspace:^",
"immutable": "^4.0.0",
"jest-util": "workspace:^",
"react": "17.0.2",
Expand Down
11 changes: 5 additions & 6 deletions packages/pretty-format/src/__tests__/AsymmetricMatcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

import {AsymmetricMatcher as AbstractAsymmetricMatcher} from 'expect';
import prettyFormat, {plugins} from '../';
import type {OptionsReceived} from '../types';

Expand Down Expand Up @@ -349,10 +348,10 @@ test('min option', () => {
);
});

class DummyMatcher extends AbstractAsymmetricMatcher<number> {
constructor(sample: number) {
super(sample);
}
class DummyMatcher {
$$typeof = Symbol.for('jest.asymmetricMatcher');

constructor(private sample: number) {}

asymmetricMatch(other: number) {
return this.sample === other;
Expand All @@ -362,7 +361,7 @@ class DummyMatcher extends AbstractAsymmetricMatcher<number> {
return 'DummyMatcher';
}

override getExpectedType() {
getExpectedType() {
return 'number';
}
}
1 change: 0 additions & 1 deletion packages/pretty-format/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
},
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
// no `expect`, only used in tests
"references": [{"path": "../jest-schemas"}, {"path": "../jest-util"}]
}
7 changes: 0 additions & 7 deletions scripts/buildTs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ import {getPackages} from './buildUtils.mjs';
}
}

// dev dep
if (pkg.name === 'pretty-format') {
if (dep === 'expect') {
return false;
}
}

return true;
})
.map(dep =>
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16862,7 +16862,6 @@ __metadata:
"@types/react-is": ^17.0.0
"@types/react-test-renderer": 17.0.2
ansi-styles: ^5.0.0
expect: "workspace:^"
immutable: ^4.0.0
jest-util: "workspace:^"
react: 17.0.2
Expand Down