Skip to content

hurrymaplelad/chai-colors

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

Color assertions for chai

Resources

Stars

Watchers

Forks

Packages

No packages published