Commits
Tim Donohue authored and GitHub committed ff0291d3460 Merge
1 + | /** |
2 + | * The contents of this file are subject to the license and copyright |
3 + | * detailed in the LICENSE and NOTICE files at the root of the source |
4 + | * tree and available online at |
5 + | * |
6 + | * http://www.dspace.org/license/ |
7 + | */ |
8 + | import { SequenceService } from './sequence.service'; |
9 + | |
10 + | let service: SequenceService; |
11 + | |
12 + | describe('SequenceService', () => { |
13 + | beforeEach(() => { |
14 + | service = new SequenceService(); |
15 + | }); |
16 + | |
17 + | it('should return sequential numbers on next(), starting with 1', () => { |
18 + | const NUMBERS = [1,2,3,4,5]; |
19 + | const sequence = NUMBERS.map(() => service.next()); |
20 + | expect(sequence).toEqual(NUMBERS); |
21 + | }); |
22 + | }); |