Skip to content

Commit 2661c4f

Browse files
committed
using faker module to generate emails, names and dates on testcases
PR #32
1 parent 6e56e00 commit 2661c4f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test/dataverseClient.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { expect } from 'chai'
44
import axios from 'axios'
55
import request from 'request-promise'
66
import path from 'path'
7-
import { internet, random, system } from 'faker'
7+
import { internet, random, system, name, date } from 'faker'
88
import { DataverseException } from '../src/exceptions/dataverseException'
99
import { DataverseMetricType } from '../src/@types/dataverseMetricType'
1010
import { DatasetSubjects } from '../src/@types/datasetSubjects'
@@ -1488,14 +1488,14 @@ describe('DataverseClient', () => {
14881488
it('should call axios with expected url', async () => {
14891489
const datasetId = random.number().toString()
14901490
const datasetInformation: BasicDatasetInformation = {
1491-
title: 's',
1492-
descriptions: [{ text: 'some ', date: '2019-09-09' }],
1491+
title: random.words(),
1492+
descriptions: [{ text: random.words(), date: date.recent().toString() }],
14931493
authors: [
14941494
{
1495-
fullname: 'tester tests'
1495+
fullname: name.findName()
14961496
}
14971497
],
1498-
contact: [{ email: 'tai@theagilemonkeys.com', fullname: 'Tai Nguyen' }],
1498+
contact: [{ email: internet.email(), fullname: name.findName() }],
14991499
subject: [DatasetSubjects.AGRICULTURAL_SCIENCE]
15001500
}
15011501

0 commit comments

Comments
 (0)