1.2.1 • Published 6 years ago

chai-image-assert v1.2.1

Weekly downloads
585
License
MIT
Repository
github
Last release
6 years ago

Build Status

chai-image-assert

This repo provides a chai assertion to match buffers against image files.

The assert uses ImageMagick's compare tool.

Usage

var fs = require('fs');
var path = require('path');
var chai = require('chai');
chai.use(require('chai-image-assert')(__dirname));

describe("my test", function () {
    it("should match", function () {
        var myFile = fs.readFileSync(path.join("path-to-my-file.png"));
        expect(myFile).to.matchImage('name-in-expected');
    });
});
1.2.1

6 years ago

1.2.0

8 years ago

1.2.0-rc1

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

9 years ago

1.0.0

9 years ago