Skip to content

Commit 6c3629b

Browse files
authored
Merge pull request #139 from contentstack/fix/testCases2
fixTestCases2
2 parents a6c6791 + ca6a19d commit 6c3629b

File tree

2 files changed

+5374
-56
lines changed

2 files changed

+5374
-56
lines changed

test/unit/commands/tsgen.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ describe('Tsgen command', () => {
2323
.stdout({print: process.env.PRINT === 'true' || false})
2424
.nock(graphqlUrl, api =>
2525
api
26-
.post(`/stacks/${mock.tokens[alias].apiKey}`)
26+
.post(`/stacks/${mock.tokens[alias].apiKey}?environment=development`)
2727
.reply(200, {
28-
data: mock.output,
28+
data: mock.mock_data,
2929
})
3030
)
3131
.command(['tsgen', '--token-alias', alias, '--output', filePath, '--api-type', 'graphql'])
@@ -37,9 +37,9 @@ describe('Tsgen command', () => {
3737
.stdout({print: process.env.PRINT === 'true' || false})
3838
.nock(graphqlUrl, api =>
3939
api
40-
.post(`/stacks/${mock.tokens[alias].apiKey}`)
40+
.post(`/stacks/${mock.tokens[alias].apiKey}?environment=development`)
4141
.reply(200, {
42-
data: mock.output,
42+
data: mock.mock_data,
4343
})
4444
)
4545
.command(['tsgen', '--api-type', 'graphql', '-a', alias, '--output', filePath, '--namespace', 'GraphQL'])

0 commit comments

Comments
 (0)