Whoo got unit tests that are failing...
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import HSL from "../src/hsl"
|
||||
import RGB from "../src/rgb"
|
||||
|
||||
describe("HSL", () => {
|
||||
it("should match provided base RBG values", () => {
|
||||
const red = HSL.fromRgb(new RGB(255, 0, 0))
|
||||
expect(red.hue).toEqual(0)
|
||||
expect(red.lightness).toEqual(.5)
|
||||
expect(red.saturation).toEqual(1)
|
||||
|
||||
const green = HSL.fromRgb(new RGB(0, 255, 0))
|
||||
expect(green.hue).toEqual(120)
|
||||
expect(green.lightness).toEqual(.5)
|
||||
expect(green.saturation).toEqual(1)
|
||||
|
||||
const blue = HSL.fromRgb(new RGB(0, 0, 255))
|
||||
expect(blue.hue).toEqual(240)
|
||||
expect(blue.lightness).toEqual(.5)
|
||||
expect(blue.saturation).toEqual(1)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,32 @@
|
||||
export default {
|
||||
srcDir: "src",
|
||||
srcFiles: [
|
||||
"**/*.js"
|
||||
],
|
||||
specDir: "www",
|
||||
specFiles: [
|
||||
"test.js"
|
||||
],
|
||||
helpers: [
|
||||
"helpers/**/*.js"
|
||||
],
|
||||
env: {
|
||||
stopSpecOnExpectationFailure: false,
|
||||
stopOnSpecFailure: false,
|
||||
random: true,
|
||||
// Fail if a suite contains multiple suites or specs with the same name.
|
||||
forbidDuplicateNames: true
|
||||
},
|
||||
|
||||
// For security, listen only to localhost. You can also specify a different
|
||||
// hostname or IP address, or remove the property or set it to "*" to listen
|
||||
// to all network interfaces.
|
||||
listenAddress: "localhost",
|
||||
|
||||
// The hostname that the browser will use to connect to the server.
|
||||
hostname: "localhost",
|
||||
|
||||
browser: {
|
||||
name: "firefox"
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user