1.2.1 • Published 5 years ago

chai-image-assert v1.2.1

Weekly downloads
585
License
MIT
Repository
github
Last release
5 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

5 years ago

1.2.0

7 years ago

1.2.0-rc1

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

8 years ago

1.0.0

8 years ago