1
exercism fetch coffeescript nth-prime

nth_prime_test.spec.coffee

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Prime = require './prime'

describe 'Prime', ->

  it 'first', ->
    prime = Prime.nth(1)
    expect(prime).toEqual(2)

  xit 'second', ->
    prime = Prime.nth(2)
    expect(prime).toEqual(3)

  xit 'sixth', ->
    prime = Prime.nth(6)
    expect(prime).toEqual(13)

  xit 'big prime', ->
    prime = Prime.nth(10001)
    expect(prime).toEqual(104743)

  xit 'weird case', ->
    expect(-> Prime.nth(0)).toThrow("Prime is not possible")