Skip to content

Commit b9e601c

Browse files
author
Kent C. Dodds
committed
Responding to PR comments
1 parent e9a2b2a commit b9e601c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

index.d.ts

+12
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@ export interface AssertContext {
129129
* Assert that function throws an error or promise rejects.
130130
* @param error Can be a constructor, regex, error message or validation function.
131131
*/
132+
/**
133+
* Assert that value is deep equal to expected. (DEPRECATED, use `deepEqual`)
134+
*/
135+
same<U>(value: U, expected: U, message?: string): void;
136+
/**
137+
* Assert that value is not deep equal to expected. (DEPRECATED use `notDeepEqual`)
138+
*/
139+
notSame<U>(value: U, expected: U, message?: string): void;
140+
/**
141+
* Assert that function throws an error or promise rejects.
142+
* @param error Can be a constructor, regex, error message or validation function.
143+
*/
132144
throws(value: Promise<{}>, error?: ErrorValidator, message?: string): Promise<any>;
133145
throws(value: () => void, error?: ErrorValidator, message?: string): any;
134146
/**

lib/assert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,5 @@ x.same = util.deprecate(x.deepEqual, getDeprecationNotice('same()', 'deepEqual()
146146
x.notSame = util.deprecate(x.notDeepEqual, getDeprecationNotice('notSame()', 'notDeepEqual()'));
147147

148148
function getDeprecationNotice(oldApi, newApi) {
149-
return `DEPRECATION NOTICE: ${oldApi} has been renamed to ${newApi} and will eventually be removed. See https://github.com/jamestalmage/ava-codemods to help upgrade your codebase automatically.`;
149+
return 'DEPRECATION NOTICE: ' + oldApi + ' has been renamed to ' + newApi + ' and will eventually be removed. See https://github.com/jamestalmage/ava-codemods to help upgrade your codebase automatically.';
150150
}

0 commit comments

Comments
 (0)