JSPM

chai-colors

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 29427
  • Score
    100M100P100Q145348F
  • License MIT

Color assertions for chai

Package Exports

  • chai-colors

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chai-colors) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

chai-colors

Color assertions for chai. Thin wrapper around onecolor.

NPM version Build Status

Compare different color representations:

'rgba(0, 0, 0, 1)'.should.be.colored('#000000');

Combine with webdriver for more fun:

browser
  .elementByCss('code .hljs-keyword')
  .getComputedCss('color').should.eventually.be.colored('mintcream')

Installation

This is a addon plugin for the Chai Assertion Library. Install via npm.

npm install chai-colors

Plugin

Use this plugin as you would all other Chai plugins.

var chai = require('chai')
  , chaiColors = require('chai-colors');

chai.use(chaiColors);

Supported Formats

See the onecolor API.