Skip to content

Commit

Permalink
chore: removing string templating where are aren't inserting vars
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed Dec 2, 2021
1 parent b2f91ef commit 738b70d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions __tests__/cmds/docs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ describe('rdme docs', () => {
expect.assertions(1);

const getMocks = getNockWithVersionHeader(version)
.get(`/api/v1/docs/simple-doc`)
.get('/api/v1/docs/simple-doc')
.basicAuth({ user: key })
.reply(200, { category, slug: simpleDoc.slug, lastUpdatedHash: 'anOldHash' })
.get(`/api/v1/docs/another-doc`)
.get('/api/v1/docs/another-doc')
.basicAuth({ user: key })
.reply(200, { category, slug: anotherDoc.slug, lastUpdatedHash: 'anOldHash' });

Expand Down Expand Up @@ -170,7 +170,7 @@ describe('rdme docs', () => {
});

const postMock = getNockWithVersionHeader(version)
.post(`/api/v1/docs`, { slug, body: doc.content, ...doc.data, lastUpdatedHash: hash })
.post('/api/v1/docs', { slug, body: doc.content, ...doc.data, lastUpdatedHash: hash })
.basicAuth({ user: key })
.reply(201, { slug, body: doc.content, ...doc.data, lastUpdatedHash: hash });

Expand Down Expand Up @@ -295,7 +295,7 @@ describe('rdme docs', () => {
});

const postMock = getNockWithVersionHeader(version)
.post(`/api/v1/docs`, { slug, body: doc.content, ...doc.data, lastUpdatedHash: hash })
.post('/api/v1/docs', { slug, body: doc.content, ...doc.data, lastUpdatedHash: hash })
.basicAuth({ user: key })
.reply(201, { slug: doc.data.slug, body: doc.content, ...doc.data, lastUpdatedHash: hash });

Expand Down
14 changes: 7 additions & 7 deletions __tests__/cmds/openapi.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ describe('rdme openapi', () => {
promptHandler.createOasPrompt.mockResolvedValue({ option: 'create' });

const mock = nock(config.host)
.get(`/api/v1/version`)
.get('/api/v1/version')
.basicAuth({ user: key })
.reply(200, [{ version }])
.post('/api/v1/version')
.basicAuth({ user: key })
.reply(200, { from: '1.0.1', version: '1.0.1' })
.get(`/api/v1/api-specification`)
.get('/api/v1/api-specification')
.basicAuth({ user: key })
.reply(200, [])
.post('/api/v1/api-specification', body => body.match('form-data; name="spec"'))
Expand Down Expand Up @@ -73,7 +73,7 @@ describe('rdme openapi', () => {
.get(`/api/v1/version/${version}`)
.basicAuth({ user: key })
.reply(200, { version: '1.0.0' })
.get(`/api/v1/api-specification`)
.get('/api/v1/api-specification')
.basicAuth({ user: key })
.reply(200, [])
.post('/api/v1/api-specification', body => body.match('form-data; name="spec"'))
Expand All @@ -99,7 +99,7 @@ describe('rdme openapi', () => {

it('should POST to the swagger api if no id provided', () => {
const mock = nock(config.host)
.get(`/api/v1/api-specification`)
.get('/api/v1/api-specification')
.basicAuth({ user: key })
.reply(200, [])
.get(`/api/v1/version/${version}`)
Expand Down Expand Up @@ -127,7 +127,7 @@ describe('rdme openapi', () => {
.get(`/api/v1/version/${version}`)
.basicAuth({ user: key })
.reply(200, { version: '1.0.0' })
.get(`/api/v1/api-specification`)
.get('/api/v1/api-specification')
.basicAuth({ user: key })
.reply(200, [])
.post('/api/v1/api-specification', body => body.match('form-data; name="spec"'))
Expand Down Expand Up @@ -165,7 +165,7 @@ describe('rdme openapi', () => {
.post('/api/v1/version')
.basicAuth({ user: key })
.reply(200, { from: '1.0.1', version: '1.0.1' })
.get(`/api/v1/api-specification`)
.get('/api/v1/api-specification')
.basicAuth({ user: key })
.reply(200, [])
.post('/api/v1/api-specification', body => body.match('form-data; name="spec"'))
Expand Down Expand Up @@ -213,7 +213,7 @@ describe('rdme openapi', () => {
it('should bundle and upload the expected content', () => {
let requestBody = null;
const mock = nock(config.host)
.get(`/api/v1/api-specification`)
.get('/api/v1/api-specification')
.basicAuth({ user: key })
.reply(200, [])
.get(`/api/v1/version/${version}`)
Expand Down
2 changes: 1 addition & 1 deletion __tests__/cmds/versions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('rdme versions*', () => {
.get('/api/v1/version')
.basicAuth({ user: key })
.reply(200, [{ version }, { version }])
.post(`/api/v1/version`)
.post('/api/v1/version')
.basicAuth({ user: key })
.reply(201, { version });

Expand Down

0 comments on commit 738b70d

Please sign in to comment.