Skip to content

Commit 09cc35e

Browse files
isidorelexler
andcommitted
- B fixed typo in FileExtention
Co-Authored-By: Lada Kesseler <23501754+lexler@users.noreply.github.com>
1 parent 83c84ca commit 09cc35e

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

lib/Core/Options.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ class FileOptions {
1212
this.options = options;
1313
}
1414

15+
/** @deprecated Use withFileExtension instead. This method has a typo and will be removed in a future version. */
1516
withFileExtention(extensionWithDot: string): Options {
16-
return this.options.modify("FileExtention", extensionWithDot);
17+
return this.withFileExtension(extensionWithDot);
18+
}
19+
withFileExtension(extensionWithDot: string): Options {
20+
return this.options.modify("FileExtension", extensionWithDot);
1721
}
1822

1923
getFileExtension(): string {
20-
return this.options.get("FileExtention", () => ".txt");
24+
return this.options.get("FileExtension", () => ".txt");
2125
}
2226
}
2327

lib/Providers/Jest/JestApprovals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function verify(sut: any, options?: Options): void {
3333
export function verifyAsJson(data: any, options?: Options): void {
3434
const text = printJson(data);
3535
options = options || new Options();
36-
options = options.forFile().withFileExtention(".json");
36+
options = options.forFile().withFileExtension(".json");
3737
verify(text, options);
3838
}
3939

lib/Providers/Mocha/MochaApprovals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function verify(sut: any, options?: Options): void {
5555
export function verifyAsJson(data: any, options?: Options): void {
5656
const text = printJson(data);
5757
options = options || new Options();
58-
options = options.forFile().withFileExtention(".json");
58+
options = options.forFile().withFileExtension(".json");
5959
verify(text, options);
6060
}
6161

0 commit comments

Comments
 (0)