Skip to content

Commit 0400cac

Browse files
committed
Migrated unparse test suite to assert
refs https://github.com/TryGhost/Team/issues/1076 - The 'should' assertion library is deprecated. Native 'assert' is the recommended lib to use - Migrating this bit of code allows to remove the should's "utils" folder. Less code, yey!
1 parent 6ab2699 commit 0400cac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/members-csv/test/unparse.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const should = require('should');
1+
const assert = require('assert');
22
const {unparse} = require('../index');
33

44
describe('unparse', function () {
@@ -11,10 +11,10 @@ describe('unparse', function () {
1111

1212
const result = unparse(json);
1313

14-
should.exist(result);
14+
assert.ok(result);
1515

16-
const expected = `id,email,name,note,subscribed_to_emails,complimentary_plan,stripe_customer_id,created_at,deleted_at,labels,products\r\n,[email protected],Sam Memberino,Early supporter,,,,,,,`;
17-
should.equal(result, expected);
16+
const expected = `id,email,name,note,subscribed_to_emails,complimentary_plan,stripe_customer_id,created_at,deleted_at,labels,tiers\r\n,[email protected],Sam Memberino,Early supporter,,,,,,,`;
17+
assert.equal(result, expected);
1818
});
1919

2020
it('maps the subscribed property to subscribed_to_emails', function () {
@@ -31,6 +31,6 @@ describe('unparse', function () {
3131

3232
const expected = `email,subscribed_to_emails\r\[email protected],false`;
3333

34-
should.equal(result, expected);
34+
assert.equal(result, expected);
3535
});
3636
});

0 commit comments

Comments
 (0)