Skip to content

Commit

Permalink
Merge pull request #233 from lokesh/dev
Browse files Browse the repository at this point in the history
build: resolve Quantize dep issue, upgrade Cypress
  • Loading branch information
lokesh authored Feb 28, 2023
2 parents ef231c7 + d955bb0 commit 9282017
Show file tree
Hide file tree
Showing 18 changed files with 9,803 additions and 8,309 deletions.
13 changes: 13 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},

experimentalRunAllSpecs: true,
},
})
1 change: 0 additions & 1 deletion cypress.json

This file was deleted.

6 changes: 3 additions & 3 deletions cypress/integration/api_spec.js → cypress/e2e/api.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ function rgbCount(text) {
return vals.length / 3
}

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

Expand All @@ -18,7 +18,7 @@ describe('getColor()', function() {
const count = rgbCount($el.text())
expect(count).to.equal(1);
});
})
})

it('returns valid color from red image', function() {
cy.get('[data-image="red.png"] .output-color').should(($el) => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added cypress/videos/api.cy.js.mp4
Binary file not shown.
Binary file added cypress/videos/cors.cy.js.mp4
Binary file not shown.
Binary file added cypress/videos/module.cy.js.mp4
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/color-thief.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const getPixels = require('get-pixels');
const quantize = require('quantize');
const quantize = require('@lokesh.dhakar/quantize');

function createPixelArray(imgData, pixelCount, quality) {
const pixels = imgData;
Expand Down
2 changes: 1 addition & 1 deletion dist/color-thief.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9282017

Please sign in to comment.