Skip to content

Commit db6b555

Browse files
authored
test: remove duplicate fixed-seeded-tests (#1653)
1 parent cf764b9 commit db6b555

File tree

2 files changed

+2
-103
lines changed

2 files changed

+2
-103
lines changed

test/__snapshots__/system.spec.ts.snap

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -239,75 +239,3 @@ exports[`system > 1337 > networkInterface > with {"interfaceType":"ww"} 1`] = `"
239239
exports[`system > 1337 > networkInterface > with {} 1`] = `"enx234870538945"`;
240240

241241
exports[`system > 1337 > semver 1`] = `"2.5.1"`;
242-
243-
exports[`system > seed: 42 > commonFileExt() 1`] = `"png"`;
244-
245-
exports[`system > seed: 42 > commonFileName() 1`] = `"nonbeliever_stub.png"`;
246-
247-
exports[`system > seed: 42 > commonFileType() 1`] = `"audio"`;
248-
249-
exports[`system > seed: 42 > cron() 1`] = `"* 19 * 3 5"`;
250-
251-
exports[`system > seed: 42 > directoryPath() 1`] = `"/opt/bin"`;
252-
253-
exports[`system > seed: 42 > fileExt() 1`] = `"lrm"`;
254-
255-
exports[`system > seed: 42 > fileName() 1`] = `"nonbeliever_stub.skt"`;
256-
257-
exports[`system > seed: 42 > filePath() 1`] = `"/opt/bin/crowded_fail_woefully.dra"`;
258-
259-
exports[`system > seed: 42 > fileType() 1`] = `"image"`;
260-
261-
exports[`system > seed: 42 > mimeType() 1`] = `"application/vnd.ibm.rights-management"`;
262-
263-
exports[`system > seed: 42 > networkInterface() 1`] = `"wlp1s7"`;
264-
265-
exports[`system > seed: 42 > semver() 1`] = `"3.7.9"`;
266-
267-
exports[`system > seed: 1211 > commonFileExt() 1`] = `"htm"`;
268-
269-
exports[`system > seed: 1211 > commonFileName() 1`] = `"although_instantly_though.gif"`;
270-
271-
exports[`system > seed: 1211 > commonFileType() 1`] = `"application"`;
272-
273-
exports[`system > seed: 1211 > cron() 1`] = `"55 * 28 * 1"`;
274-
275-
exports[`system > seed: 1211 > directoryPath() 1`] = `"/var/log"`;
276-
277-
exports[`system > seed: 1211 > fileExt() 1`] = `"dic"`;
278-
279-
exports[`system > seed: 1211 > fileName() 1`] = `"although_instantly_though.ustar"`;
280-
281-
exports[`system > seed: 1211 > filePath() 1`] = `"/var/log/outside_even.xhvml"`;
282-
283-
exports[`system > seed: 1211 > fileType() 1`] = `"x-shader"`;
284-
285-
exports[`system > seed: 1211 > mimeType() 1`] = `"text/vnd.dmclientscript"`;
286-
287-
exports[`system > seed: 1211 > networkInterface() 1`] = `"wws8d1"`;
288-
289-
exports[`system > seed: 1211 > semver() 1`] = `"9.4.8"`;
290-
291-
exports[`system > seed: 1337 > commonFileExt() 1`] = `"wav"`;
292-
293-
exports[`system > seed: 1337 > commonFileName() 1`] = `"although.wav"`;
294-
295-
exports[`system > seed: 1337 > commonFileType() 1`] = `"audio"`;
296-
297-
exports[`system > seed: 1337 > cron() 1`] = `"15 13 5 * *"`;
298-
299-
exports[`system > seed: 1337 > directoryPath() 1`] = `"/Library"`;
300-
301-
exports[`system > seed: 1337 > fileExt() 1`] = `"oa3"`;
302-
303-
exports[`system > seed: 1337 > fileName() 1`] = `"although.chrt"`;
304-
305-
exports[`system > seed: 1337 > filePath() 1`] = `"/Library/yum_fast.aiff"`;
306-
307-
exports[`system > seed: 1337 > fileType() 1`] = `"font"`;
308-
309-
exports[`system > seed: 1337 > mimeType() 1`] = `"application/vnd.chipnuts.karaoke-mmd"`;
310-
311-
exports[`system > seed: 1337 > networkInterface() 1`] = `"enx234870538945"`;
312-
313-
exports[`system > seed: 1337 > semver() 1`] = `"2.5.1"`;

test/system.spec.ts

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
11
import validator from 'validator';
22
import { afterEach, describe, expect, it } from 'vitest';
33
import { faker } from '../src';
4-
import { seededRuns, seededTests } from './support/seededRuns';
4+
import { seededTests } from './support/seededRuns';
55
import { times } from './support/times';
66

77
const NON_SEEDED_BASED_RUN = 5;
88

9-
const functionNames = [
10-
'commonFileExt',
11-
'commonFileName',
12-
'commonFileType',
13-
'cron',
14-
'directoryPath',
15-
'fileExt',
16-
'fileName',
17-
'filePath',
18-
'fileType',
19-
'mimeType',
20-
'networkInterface',
21-
'semver',
22-
];
23-
249
describe('system', () => {
2510
afterEach(() => {
2611
faker.locale = 'en';
@@ -80,20 +65,6 @@ describe('system', () => {
8065
});
8166
});
8267

83-
for (const seed of seededRuns) {
84-
describe(`seed: ${seed}`, () => {
85-
for (const functionName of functionNames) {
86-
it(`${functionName}()`, () => {
87-
faker.seed(seed);
88-
89-
const actual = faker.system[functionName]();
90-
91-
expect(actual).toMatchSnapshot();
92-
});
93-
}
94-
});
95-
}
96-
9768
describe(`random seeded tests for seed ${faker.seed()}`, () => {
9869
for (let i = 1; i <= NON_SEEDED_BASED_RUN; i++) {
9970
describe('commonFileExt()', () => {
@@ -437,7 +408,7 @@ describe('system', () => {
437408
);
438409

439410
it('should return non-standard cron expressions', () => {
440-
const validResults = ['1', '2', '3', '4', '5', '*', '@'];
411+
const validResults = ['1', '2', '3', '4', '5', '6', '*', '@'];
441412
expect(
442413
faker.system.cron({ includeNonStandard: true })[0],
443414
'generated cron, string should contain non-standard cron labels'

0 commit comments

Comments
 (0)