mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Migrate to jest (#1520)
Mocha doesn't have a lot of features provided by jest. There is a great assertion library out of the box. And the most cool feature is inline snapshots. Mocha also hides errors which makes debugging a nightmare sometimes.
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const { expect } = require('chai');
|
||||
const { visit, detachNodeFromParent } = require('./xast.js');
|
||||
|
||||
const getAst = () => {
|
||||
@ -57,7 +56,7 @@ describe('xast', () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(entered).to.deep.equal([
|
||||
expect(entered).toEqual([
|
||||
'root',
|
||||
'element:g',
|
||||
'element:rect',
|
||||
@ -81,7 +80,7 @@ describe('xast', () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(exited).to.deep.equal([
|
||||
expect(exited).toEqual([
|
||||
'element:rect',
|
||||
'element:circle',
|
||||
'element:g',
|
||||
@ -103,6 +102,6 @@ describe('xast', () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(entered).to.deep.equal(['g', 'ellipse']);
|
||||
expect(entered).toEqual(['g', 'ellipse']);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user