remove-suffix.js
451 Bytes
/* global describe it */
require('should');
const removeSuffix = require('../lib/remove-suffix');
describe('#removeSuffix', () => {
it('should return correctly', () => {
removeSuffix('62812812@phonenumber', '@phonenumber').should.equal('62812812');
removeSuffix('62812812@phonenumber', '').should.equal('62812812@phonenumber');
removeSuffix('62812812@phonenumber', null).should.equal('62812812@phonenumber');
});
});