Skip to content

Commit

Permalink
style: fix linting errors with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
henri-hulski committed Jun 4, 2023
1 parent 814c6fe commit b348434
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ describe('getCurrentPackageVersion', () => {
})
})

it(
'should return null when latest in not a semver version',
done => {
getCurrentPackageVersion('@repo-cooker-test/poissonier').then(version => {
assert.equal(version, null, done)
})
}
)
it('should return null when latest in not a semver version', done => {
getCurrentPackageVersion('@repo-cooker-test/poissonier').then(version => {
assert.equal(version, null, done)
})
})
})
19 changes: 8 additions & 11 deletions src/actions/evaluateSemverByPackage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ const semverByPackage = {
baz: 'major',
}

it(
'should run the grouping function for every commit and group commits',
done => {
testAction(
evaluateSemverByPackage,
{ commitsByPackage },
{ semverByPackage },
done
)
}
)
it('should run the grouping function for every commit and group commits', done => {
testAction(
evaluateSemverByPackage,
{ commitsByPackage },
{ semverByPackage },
done
)
})

it('should bump all to major for Big Bang hash', done => {
const semverByPackage = {
Expand Down
27 changes: 12 additions & 15 deletions src/actions/groupCommitsByPackage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,19 @@ const commits = [
},
]

it(
'should run the grouping function for every commit and group commits',
done => {
const commitsByPackage = {
'@repo-cooker-test/commis': [commits[0], commits[1], commits[2]],
'@repo-cooker-test/entremetier': [
commits[0],
commits[3],
commits[4],
commits[5],
],
}

testAction(groupCommitsByPackage, { commits }, { commitsByPackage }, done)
it('should run the grouping function for every commit and group commits', done => {
const commitsByPackage = {
'@repo-cooker-test/commis': [commits[0], commits[1], commits[2]],
'@repo-cooker-test/entremetier': [
commits[0],
commits[3],
commits[4],
commits[5],
],
}
)

testAction(groupCommitsByPackage, { commits }, { commitsByPackage }, done)
})

it('should not get confused by similar package names', done => {
const commits = [
Expand Down
66 changes: 30 additions & 36 deletions src/actions/helpers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,27 @@ import { backwardGraph, forwardGraph } from './helpers'
import assert from 'test-utils/assert'

describe('helpers.backwardGraph', done => {
it(
'should walk dependency graph backwards and return visited nodes',
done => {
/*
it('should walk dependency graph backwards and return visited nodes', done => {
/*
depends on
a --> b --> c
--> d
e --> b
*/
const deps = {
a: ['b', 'd'],
b: ['c'],
c: [],
d: [],
e: ['b'],
f: [],
}
assert.deepEqual(
backwardGraph(deps, ['c']),
{ c: true, b: true, a: true, e: true },
done
)
const deps = {
a: ['b', 'd'],
b: ['c'],
c: [],
d: [],
e: ['b'],
f: [],
}
)
assert.deepEqual(
backwardGraph(deps, ['c']),
{ c: true, b: true, a: true, e: true },
done
)
})

it('should support circular depencencies', done => {
/*
Expand All @@ -53,30 +50,27 @@ describe('helpers.backwardGraph', done => {
})

describe('helpers.forwardGraph', done => {
it(
'should walk dependency graph forwards and return visited nodes',
done => {
/*
it('should walk dependency graph forwards and return visited nodes', done => {
/*
depends on
a --> b --> c
--> d
e
*/
const deps = {
a: ['b', 'd'],
b: ['c'],
c: [],
d: [],
e: [],
f: [],
}
assert.deepEqual(
forwardGraph(deps, ['a', 'e']),
{ a: true, b: true, c: true, d: true, e: true },
done
)
const deps = {
a: ['b', 'd'],
b: ['c'],
c: [],
d: [],
e: [],
f: [],
}
)
assert.deepEqual(
forwardGraph(deps, ['a', 'e']),
{ a: true, b: true, c: true, d: true, e: true },
done
)
})

it('should support circular depencencies', done => {
/*
Expand Down
11 changes: 4 additions & 7 deletions src/actions/linkAsModule.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ it('should link as modules', done => {
)
})

it(
'should skip link as modules if common path contains node_modules',
done => {
jest.setTimeout(4000)
testAction(linkAsModule, {}, { linkAsModule: {}, commands: [] }, done)
}
)
it('should skip link as modules if common path contains node_modules', done => {
jest.setTimeout(4000)
testAction(linkAsModule, {}, { linkAsModule: {}, commands: [] }, done)
})

it('should not link as modules inside part of name', done => {
jest.setTimeout(4000)
Expand Down
9 changes: 3 additions & 6 deletions src/helpers/parseCommit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { commits, parsedCommits } from 'test-utils/commits'
import assert from 'test-utils/assert'
import { parseCommit } from './parseCommit'

it(
'should parse commits for breaking changes, issues, scope, etc',
done => {
assert.deepEqual(commits.map(parseCommit), parsedCommits, done)
}
)
it('should parse commits for breaking changes, issues, scope, etc', done => {
assert.deepEqual(commits.map(parseCommit), parsedCommits, done)
})

0 comments on commit b348434

Please sign in to comment.