|
1 |
| -import { LANGUAGES } from '../../../common'; |
2 |
| -import { decideWhereToSpread, cleanUpCommitMessage } from '../spreadGeneration'; |
| 1 | +import { cleanUpCommitMessage } from '../spreadGeneration'; |
3 | 2 | import text from '../text';
|
4 | 3 |
|
5 | 4 | describe('spread generation', () => {
|
6 |
| - describe('decideWhereToSpread', () => { |
7 |
| - it('spreads to all languages if it is a release commit', () => { |
8 |
| - expect( |
9 |
| - decideWhereToSpread(`${text.commitReleaseMessage} [skip ci]`) |
10 |
| - ).toEqual(LANGUAGES); |
11 |
| - }); |
12 |
| - |
13 |
| - it('spreads to all languages if scope is missing', () => { |
14 |
| - expect(decideWhereToSpread('chore: do something')).toEqual(LANGUAGES); |
15 |
| - }); |
16 |
| - |
17 |
| - it('spreads to javascript if the scope is javascript', () => { |
18 |
| - expect(decideWhereToSpread('fix(javascript): fix something')).toEqual([ |
19 |
| - 'javascript', |
20 |
| - ]); |
21 |
| - }); |
22 |
| - |
23 |
| - LANGUAGES.forEach((lang) => { |
24 |
| - it(`spreads to ${lang} if the scope is ${lang}`, () => { |
25 |
| - expect(decideWhereToSpread(`fix(${lang}): fix something`)).toEqual([ |
26 |
| - lang, |
27 |
| - ]); |
28 |
| - }); |
29 |
| - }); |
30 |
| - |
31 |
| - it('spreads to all if scope is not specific language', () => { |
32 |
| - ['cts', 'spec', 'script', 'ci'].forEach((scope) => { |
33 |
| - expect(decideWhereToSpread(`fix(${scope}): fix something`)).toEqual( |
34 |
| - LANGUAGES |
35 |
| - ); |
36 |
| - }); |
37 |
| - }); |
38 |
| - }); |
39 |
| - |
40 | 5 | describe('cleanUpCommitMessage', () => {
|
41 | 6 | it('returns a release commit message with the version', () => {
|
42 | 7 | expect(
|
|
0 commit comments