Skip to content

Commit

Permalink
Merge pull request #249 from zendesk/rdemeterio/check-unit-testing
Browse files Browse the repository at this point in the history
[NO JIRA] fix: failing tests due to rebase and vite migration
  • Loading branch information
romeodemeteriojr authored Aug 5, 2024
2 parents 6f9d18a + e5c81cf commit 08a912e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/zcli-apps/tests/functional/new.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ describe('apps new', () => {
await cleanDirectory(dirPath)
})

test.it('should create a directory with webpack configs', async () => {
const webpackPath = path.join(process.cwd(), dirName, 'webpack')
expect(fs.existsSync(webpackPath)).to.eq(true)
test.it('should create a vite config file', async () => {
const viteConfigPath = path.join(process.cwd(), dirName, 'vite.config.js')
expect(fs.existsSync(viteConfigPath)).to.eq(true)
})

test.it('updates manifest.json with user input values', async () => {
Expand Down
5 changes: 2 additions & 3 deletions packages/zcli-core/src/lib/request.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { expect, test } from '@oclif/test'
import { createRequestConfig, requestAPI } from './request'
import { HttpStatusCode } from 'axios'
import * as requestUtils from './requestUtils'
import Auth from './auth'
import { Profile } from '../types'
Expand Down Expand Up @@ -103,10 +102,10 @@ describe('requestAPI', () => {
.nock('https://z3ntest.zendesk.com', api => {
api
.get('/api/v2/me')
.reply(HttpStatusCode.Ok)
.reply(200)
})
.it('should call an http endpoint', async () => {
const response = await requestAPI('api/v2/me', { method: 'GET' })
expect(response.status).to.equal(HttpStatusCode.Ok)
expect(response.status).to.equal(200)
})
})

0 comments on commit 08a912e

Please sign in to comment.