Skip to content

Commit

Permalink
🖊️ style touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
GantMan committed Apr 2, 2018
1 parent 3641d3a commit 2a275e1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions __tests__/command_helpers/checkRequirementPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ describe('checkRequirement Plugins', () => {
name: 'Empty Plugin',
description: 'I help test plugins',
rules: {
emptyDude: {}
}
emptyDude: {},
},
})
const rule = toPairs({
TestRequirement: [{ rule: 'custom', plugin: 'Empty Plugin', name: 'emptyDude' }],
Expand Down
26 changes: 15 additions & 11 deletions __tests__/command_helpers/createPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ test('investigate createPlugin', async () => {
})

describe('checking plugin paths', () => {

beforeEach(() => {
const mockedPrompt = jest
.fn()
Expand All @@ -26,30 +25,35 @@ describe('checking plugin paths', () => {
})

test(`Choice 1 - 'I do not want a generated rule file'`, async () => {
context.prompt.ask.mockImplementationOnce(() => Promise.resolve({
ruleChoice: 'I do not want a generated rule file'
}))
context.prompt.ask.mockImplementationOnce(() =>
Promise.resolve({
ruleChoice: 'I do not want a generated rule file',
})
)

const result = await createPlugin(context)
expect(result).toMatchSnapshot()
})

test(`Choice 2 - 'Just a simple rule template'`, async () => {
context.prompt.ask.mockImplementationOnce(() => Promise.resolve({
ruleChoice: 'Just a simple rule template'
}))
context.prompt.ask.mockImplementationOnce(() =>
Promise.resolve({
ruleChoice: 'Just a simple rule template',
})
)

const result = await createPlugin(context)
expect(result).toMatchSnapshot()
})

test(`Choice 3 - 'Template + optional rules'`, async () => {
context.prompt.ask.mockImplementationOnce(() => Promise.resolve({
ruleChoice: 'Template + optional rules'
}))
context.prompt.ask.mockImplementationOnce(() =>
Promise.resolve({
ruleChoice: 'Template + optional rules',
})
)

const result = await createPlugin(context)
expect(result).toMatchSnapshot()
})

})
1 change: 0 additions & 1 deletion __tests__/integration/solidarity-check/check-valid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ test('default looks for .solidarity file', async done => {
process.chdir(tempDir)
try {
await execa.shell(SOLIDARITY).then(result => {

expect(result.stdout).toContain('checks valid')
done()
})
Expand Down

0 comments on commit 2a275e1

Please sign in to comment.