aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2022-12-13 16:40:42 +0100
committerGitHub <[email protected]>2022-12-13 15:40:42 +0000
commitdb6b5551ecc0bc687f755a7d9fb5a52dad134e95 (patch)
tree34742058e2d43ec6025b69c12d35452f9b6d9f0e
parentcf764b925339d7917a641a8937735c35ed31c25a (diff)
downloadfaker-db6b5551ecc0bc687f755a7d9fb5a52dad134e95.tar.xz
faker-db6b5551ecc0bc687f755a7d9fb5a52dad134e95.zip
test: remove duplicate fixed-seeded-tests (#1653)
-rw-r--r--test/__snapshots__/system.spec.ts.snap72
-rw-r--r--test/system.spec.ts33
2 files changed, 2 insertions, 103 deletions
diff --git a/test/__snapshots__/system.spec.ts.snap b/test/__snapshots__/system.spec.ts.snap
index 308b7871..7af6e9c0 100644
--- a/test/__snapshots__/system.spec.ts.snap
+++ b/test/__snapshots__/system.spec.ts.snap
@@ -239,75 +239,3 @@ exports[`system > 1337 > networkInterface > with {"interfaceType":"ww"} 1`] = `"
exports[`system > 1337 > networkInterface > with {} 1`] = `"enx234870538945"`;
exports[`system > 1337 > semver 1`] = `"2.5.1"`;
-
-exports[`system > seed: 42 > commonFileExt() 1`] = `"png"`;
-
-exports[`system > seed: 42 > commonFileName() 1`] = `"nonbeliever_stub.png"`;
-
-exports[`system > seed: 42 > commonFileType() 1`] = `"audio"`;
-
-exports[`system > seed: 42 > cron() 1`] = `"* 19 * 3 5"`;
-
-exports[`system > seed: 42 > directoryPath() 1`] = `"/opt/bin"`;
-
-exports[`system > seed: 42 > fileExt() 1`] = `"lrm"`;
-
-exports[`system > seed: 42 > fileName() 1`] = `"nonbeliever_stub.skt"`;
-
-exports[`system > seed: 42 > filePath() 1`] = `"/opt/bin/crowded_fail_woefully.dra"`;
-
-exports[`system > seed: 42 > fileType() 1`] = `"image"`;
-
-exports[`system > seed: 42 > mimeType() 1`] = `"application/vnd.ibm.rights-management"`;
-
-exports[`system > seed: 42 > networkInterface() 1`] = `"wlp1s7"`;
-
-exports[`system > seed: 42 > semver() 1`] = `"3.7.9"`;
-
-exports[`system > seed: 1211 > commonFileExt() 1`] = `"htm"`;
-
-exports[`system > seed: 1211 > commonFileName() 1`] = `"although_instantly_though.gif"`;
-
-exports[`system > seed: 1211 > commonFileType() 1`] = `"application"`;
-
-exports[`system > seed: 1211 > cron() 1`] = `"55 * 28 * 1"`;
-
-exports[`system > seed: 1211 > directoryPath() 1`] = `"/var/log"`;
-
-exports[`system > seed: 1211 > fileExt() 1`] = `"dic"`;
-
-exports[`system > seed: 1211 > fileName() 1`] = `"although_instantly_though.ustar"`;
-
-exports[`system > seed: 1211 > filePath() 1`] = `"/var/log/outside_even.xhvml"`;
-
-exports[`system > seed: 1211 > fileType() 1`] = `"x-shader"`;
-
-exports[`system > seed: 1211 > mimeType() 1`] = `"text/vnd.dmclientscript"`;
-
-exports[`system > seed: 1211 > networkInterface() 1`] = `"wws8d1"`;
-
-exports[`system > seed: 1211 > semver() 1`] = `"9.4.8"`;
-
-exports[`system > seed: 1337 > commonFileExt() 1`] = `"wav"`;
-
-exports[`system > seed: 1337 > commonFileName() 1`] = `"although.wav"`;
-
-exports[`system > seed: 1337 > commonFileType() 1`] = `"audio"`;
-
-exports[`system > seed: 1337 > cron() 1`] = `"15 13 5 * *"`;
-
-exports[`system > seed: 1337 > directoryPath() 1`] = `"/Library"`;
-
-exports[`system > seed: 1337 > fileExt() 1`] = `"oa3"`;
-
-exports[`system > seed: 1337 > fileName() 1`] = `"although.chrt"`;
-
-exports[`system > seed: 1337 > filePath() 1`] = `"/Library/yum_fast.aiff"`;
-
-exports[`system > seed: 1337 > fileType() 1`] = `"font"`;
-
-exports[`system > seed: 1337 > mimeType() 1`] = `"application/vnd.chipnuts.karaoke-mmd"`;
-
-exports[`system > seed: 1337 > networkInterface() 1`] = `"enx234870538945"`;
-
-exports[`system > seed: 1337 > semver() 1`] = `"2.5.1"`;
diff --git a/test/system.spec.ts b/test/system.spec.ts
index a6ef61a0..e6b15c6e 100644
--- a/test/system.spec.ts
+++ b/test/system.spec.ts
@@ -1,26 +1,11 @@
import validator from 'validator';
import { afterEach, describe, expect, it } from 'vitest';
import { faker } from '../src';
-import { seededRuns, seededTests } from './support/seededRuns';
+import { seededTests } from './support/seededRuns';
import { times } from './support/times';
const NON_SEEDED_BASED_RUN = 5;
-const functionNames = [
- 'commonFileExt',
- 'commonFileName',
- 'commonFileType',
- 'cron',
- 'directoryPath',
- 'fileExt',
- 'fileName',
- 'filePath',
- 'fileType',
- 'mimeType',
- 'networkInterface',
- 'semver',
-];
-
describe('system', () => {
afterEach(() => {
faker.locale = 'en';
@@ -80,20 +65,6 @@ describe('system', () => {
});
});
- for (const seed of seededRuns) {
- describe(`seed: ${seed}`, () => {
- for (const functionName of functionNames) {
- it(`${functionName}()`, () => {
- faker.seed(seed);
-
- const actual = faker.system[functionName]();
-
- expect(actual).toMatchSnapshot();
- });
- }
- });
- }
-
describe(`random seeded tests for seed ${faker.seed()}`, () => {
for (let i = 1; i <= NON_SEEDED_BASED_RUN; i++) {
describe('commonFileExt()', () => {
@@ -437,7 +408,7 @@ describe('system', () => {
);
it('should return non-standard cron expressions', () => {
- const validResults = ['1', '2', '3', '4', '5', '*', '@'];
+ const validResults = ['1', '2', '3', '4', '5', '6', '*', '@'];
expect(
faker.system.cron({ includeNonStandard: true })[0],
'generated cron, string should contain non-standard cron labels'