Skip to content

Commit 9282017

Browse files
authored
Merge pull request #233 from lokesh/dev
build: resolve Quantize dep issue, upgrade Cypress
2 parents ef231c7 + d955bb0 commit 9282017

18 files changed

Lines changed: 9803 additions & 8309 deletions

cypress.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { defineConfig } = require('cypress')
2+
3+
module.exports = defineConfig({
4+
e2e: {
5+
// We've imported your old cypress plugins here.
6+
// You may want to clean this up later by importing these.
7+
setupNodeEvents(on, config) {
8+
return require('./cypress/plugins/index.js')(on, config)
9+
},
10+
11+
experimentalRunAllSpecs: true,
12+
},
13+
})

cypress.json

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function rgbCount(text) {
88
return vals.length / 3
99
}
1010

11-
describe('getColor()', function() {
12-
before(function() {
11+
describe('getColor()', { testIsolation: false }, function() {
12+
before(function() {
1313
cy.visit('http://localhost:8080/cypress/test-pages/index.html');
1414
})
1515

@@ -18,7 +18,7 @@ describe('getColor()', function() {
1818
const count = rgbCount($el.text())
1919
expect(count).to.equal(1);
2020
});
21-
})
21+
})
2222

2323
it('returns valid color from red image', function() {
2424
cy.get('[data-image="red.png"] .output-color').should(($el) => {

cypress/videos/api.cy.js.mp4

56.9 KB
Binary file not shown.

cypress/videos/cors.cy.js.mp4

74.9 KB
Binary file not shown.

cypress/videos/module.cy.js.mp4

31.7 KB
Binary file not shown.

dist/color-thief.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const getPixels = require('get-pixels');
2-
const quantize = require('quantize');
2+
const quantize = require('@lokesh.dhakar/quantize');
33

44
function createPixelArray(imgData, pixelCount, quality) {
55
const pixels = imgData;

0 commit comments

Comments
 (0)