UNPKG

502 BJavaScriptView Raw
1import chai from 'chai';
2import msg from '../index.js';
3import pkgInfo from '../package.json';
4
5const expect = chai.expect;
6
7describe('Given an instance of my messenger', () => {
8 describe('when I need the name', () => {
9 it('should return the name', () => {
10 expect(msg.name()).to.be.equal(pkgInfo.name);
11 });
12 });
13 describe('when I need the version', () => {
14 it('should return the version', () => {
15 expect(msg.version()).to.be.equal(pkgInfo.version);
16 });
17 });
18});