Skip to content

Commit

Permalink
Add Unit Tests for Pipes
Browse files Browse the repository at this point in the history
Ref #7
  • Loading branch information
algorys committed Jun 1, 2018
1 parent 43371ea commit bd009d7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/common/pipes.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {KeysPipe} from "./pipes";

describe('KeysPipe: ', () => {
let keysPipe: KeysPipe;

beforeEach(() => {
keysPipe = new KeysPipe();
});

it('All keys of Objetc are returned', () => {
let testObject = {keyOne: 'Key is one', keyTwo: 'Key is two', keyThree: 'Key is three'};

expect(keysPipe.transform(testObject, [])).toEqual( ['keyOne', 'keyTwo', 'keyThree']);
});

});

0 comments on commit bd009d7

Please sign in to comment.