Skip to content
Snippets Groups Projects
Select Git revision
  • 60d83c8e5081cb4f45ae279f8e2013ffaebbb243
  • main default protected
2 results

defaultParameters.test.js

Blame
  • Forked from SOFT Core / SOFT 260 / JavaScript Practice
    Source project has a limited visibility.
    defaultParameters.test.js 578 B
    import { formatArithmeticProgression } from './defaultParameters.js';
    
    describe('the `formatArithmeticProgression` function', () => {
      test('formats a progression with an explicit start and increment', () => {
        expect(formatArithmeticProgression(9, 2)).toBe('9, 11, 13, …');
      });
      test('formats a progression with an implicit increment', () => {
        expect(formatArithmeticProgression(9)).toBe('9, 10, 11, …');
      });
      test('formats a progression with an implicit start and increment', () => {
        expect(formatArithmeticProgression()).toBe('0, 1, 2, …');
      });
    });