1
- import { promisify } from 'util' ;
2
- import path from 'path' ;
3
- import test from 'ava' ;
4
- import { outputJson } from 'fs-extra' ;
5
- import escape from 'escape-string-regexp' ;
6
- import tempy from 'tempy' ;
7
- import proxyquire from 'proxyquire' ;
8
- import { spy } from 'sinon' ;
9
- import { generateNotes } from '..' ;
1
+ const { promisify} = require ( 'util' ) ;
2
+ const path = require ( 'path' ) ;
3
+ const test = require ( 'ava' ) ;
4
+ const { outputJson} = require ( 'fs-extra' ) ;
5
+ const escape = require ( 'escape-string-regexp' ) ;
6
+ const tempy = require ( 'tempy' ) ;
7
+ const proxyquire = require ( 'proxyquire' ) ;
8
+ const { spy} = require ( 'sinon' ) ;
9
+ const { generateNotes} = require ( '..' ) ;
10
10
11
11
const cwd = process . cwd ( ) ;
12
12
const host = 'https://github.com' ;
@@ -232,7 +232,7 @@ test('Accept a partial "presetConfig" object as option', async t => {
232
232
t . regex ( changelog , new RegExp ( escape ( '* Change test ([222](https://github.com/owner/repo/commit/222))' ) ) ) ;
233
233
} ) ;
234
234
235
- test ( 'Use "gitHead" from "lastRelease" and "nextRelease" if "gitTag" is not defined' , async t => {
235
+ test ( 'Use "gitHead" = require( "lastRelease" and "nextRelease" if "gitTag" is not defined' , async t => {
236
236
const commits = [
237
237
{ hash : '111' , message : 'fix(scope1): First fix' } ,
238
238
{ hash : '222' , message : 'feat(scope2): Second feature' } ,
@@ -619,7 +619,7 @@ test('Throw error if "config" doesn`t exist', async t => {
619
619
) ;
620
620
} ) ;
621
621
622
- test ( 'ReThrow error from "conventional-changelog"' , async t => {
622
+ test ( 'ReThrow error = require( "conventional-changelog"' , async t => {
623
623
const commits = [
624
624
{ hash : '111' , message : 'Fix: First fix (fixes #123)' } ,
625
625
{ hash : '222' , message : 'Update: Second feature (fixes #456)' } ,
@@ -636,6 +636,6 @@ test('ReThrow error from "conventional-changelog"', async t => {
636
636
} ,
637
637
{ cwd, options : { repositoryUrl} , lastRelease, nextRelease, commits}
638
638
) ,
639
- 'Test error'
639
+ { message : 'Test error' }
640
640
) ;
641
641
} ) ;
0 commit comments