-
Happy path: successfully conversion Given: user request to GET /RGB When: user send RGB color format
/25500
Then: user should receive a HEX color format{ hex: FF0000 }
-
Invalid color format Given: user request to GET /RGB When: user send invalid RGB color format
/25500x
Then: user should see an error message with "invalid format"
-
Happy path: successfully conversion Given: user request to GET /HEX When: user send HEX color format
/FF0000
Then: user should receive a RGB color format{ rgb: 25500 }
-
Invalid color format Given: user request to GET /HEX When: user send invalid HEX color format
/FF0000x
Then: user should see an error message with "invalid format"
RGB range [0, 255]
0, 0, 0 -> Min value 255, 255, 255 -> Max value
HEX range [0, 15]
from 10 to 15 is replaced by A to F
#000000 -> Max value
- Node >=10
- Testing framework (jest, mocha, enzyme, etc..)