diff --git a/exercises/practice/resistor-color/resistor-color.test.ts b/exercises/practice/resistor-color/resistor-color.test.ts index ed88551ee..a7a257a04 100644 --- a/exercises/practice/resistor-color/resistor-color.test.ts +++ b/exercises/practice/resistor-color/resistor-color.test.ts @@ -1,33 +1,44 @@ -import { describe, xdescribe, it, expect, xit } from '@jest/globals' +import { describe, it, expect } from '@jest/globals' import { colorCode, COLORS } from './resistor-color.ts' describe('color code', () => { it('Black', () => { expect(colorCode('black')).toEqual(0) }) - - xit('White', () => { + + it('White', () => { expect(colorCode('white')).toEqual(9) }) - - xit('Orange', () => { + + it('Orange', () => { expect(colorCode('orange')).toEqual(3) }) -}) - -xdescribe('Colors', () => { - xit('returns all colors', () => { - expect(COLORS).toEqual([ - 'black', - 'brown', - 'red', - 'orange', - 'yellow', - 'green', - 'blue', - 'violet', - 'grey', - 'white', - ]) + + it('Brown', () => { + expect(colorCode('brown')).toEqual(1) + }) + + it('Red', () => { + expect(colorCode('red')).toEqual(2) + }) + + it('Yellow', () => { + expect(colorCode('yellow')).toEqual(4) + }) + + it('Green', () => { + expect(colorCode('green')).toEqual(5) + }) + + it('Blue', () => { + expect(colorCode('blue')).toEqual(6) + }) + + it('Violet', () => { + expect(colorCode('violet')).toEqual(7) + }) + + it('Grey', () => { + expect(colorCode('grey')).toEqual(8) }) })