Skip to content

Commit

Permalink
revert: test(phone): add deprecation check for phoneNumber
Browse files Browse the repository at this point in the history
This reverts commit cb4d4b8.
  • Loading branch information
xDivisionByZerox committed Jun 16, 2022
1 parent 11ce25e commit 17dfb73
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions test/phone.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { beforeEach, describe, expect, it } from 'vitest';
import { faker } from '../src';
import { luhnCheck } from '../src/modules/helpers/luhn-check';

Expand Down Expand Up @@ -119,20 +119,6 @@ describe('phone', () => {

expect(phoneNumber).toMatch(/\d/);
});

it('should log a deprecation message to the console', () => {
const consoleSpy = vi.spyOn(console, 'warn');

faker.phone.phoneNumber();

expect(consoleSpy).toHaveBeenCalled();
const logMessage = consoleSpy.mock.calls[0][0];
expect(logMessage).toContain('deprecated');
expect(logMessage).toContain('faker.phone.phoneNumber()');
expect(logMessage).toContain('faker.phone.number()');
expect(logMessage).toContain('v7.3.0');
expect(logMessage).toContain('v8.0.0');
});
});

describe('number()', () => {
Expand Down

0 comments on commit 17dfb73

Please sign in to comment.