all files / src/ util.spec.js

100% Statements 5/5
100% Branches 0/0
100% Functions 3/3
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                         
// ISC, Copyright 2017 Jaco Greeff
 
const { callSignature } = require('./util');
 
describe('util', () => {
  describe('callSignature', () => {
    it('formats the signature according to the specification', () => {
      expect(
        callSignature(
          'test_method',
          [{ name: 'b', type: 'A' }, { name: 'a', type: 'B' }],
          { type: 'A' }
        )
      ).to.equal('test_method(b: A, a: B) => A');
    });
  });
});