Skip to content

Commit

Permalink
rename samples to images
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Sep 2, 2018
1 parent 97a04ad commit bca37a9
Show file tree
Hide file tree
Showing 38 changed files with 15 additions and 21 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ You can use the coverage report to help with missed tests, but you must be aware
While developing you may want to test only on node.js:

```sh
yarn test:node
yarn test
```

...or only one test file:

```sh
yarn test:node test/some.test.js
yarn test test/some.test.js
```

...or run each time a file changes:

```sh
yarn test:node:watch
yarn test:watch
```

...or test only in a specific browser:
Expand Down
8 changes: 1 addition & 7 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ module.exports = function(config) {
files: [
'./packages/**/test/*.js',
{
pattern: 'packages/**/test/samples/**/*',
watched: false,
included: false,
served: true
},
{
pattern: 'packages/**/test/images/*',
pattern: 'packages/**/test/images/**/*',
watched: false,
included: false,
served: true
Expand Down
2 changes: 1 addition & 1 deletion packages/jimp/test/async.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from 'fs';
import should from 'should';
import { Jimp, getTestDir } from '@jimp/test-utils';

const imagesDir = getTestDir(__dirname) + '/samples';
const imagesDir = getTestDir(__dirname) + '/images';

describe('Async functions', () => {
it('write returns promise', async () => {
Expand Down
8 changes: 4 additions & 4 deletions packages/jimp/test/composite.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const jimp = configure({ plugins: [plugins] }, Jimp);
// TODO: Figure out why we need to write to file to get equal buffers
describe('composite', () => {
it('can apply more than one color transformation', async () => {
const image = getTestDir(__dirname) + '/samples/cops.jpg';
const expectedImg = getTestDir(__dirname) + '/samples/cops-masked.jpg';
const image = getTestDir(__dirname) + '/images/cops.jpg';
const expectedImg = getTestDir(__dirname) + '/images/cops-masked.jpg';

if (process.env.ENV === 'browser') {
return;
Expand All @@ -39,7 +39,7 @@ describe('composite', () => {
});

it('should handle edges correctly', async () => {
const image = getTestDir(__dirname) + '/samples/cops.jpg';
const image = getTestDir(__dirname) + '/images/cops.jpg';
const testPath = image.replace('.jpg', '-test.jpg');

if (process.env.ENV === 'browser') {
Expand All @@ -58,7 +58,7 @@ describe('composite', () => {
await background.writeAsync(testPath);

const one = fs.readFileSync(
getTestDir(__dirname) + '/samples/cops-composited.jpg'
getTestDir(__dirname) + '/images/cops-composited.jpg'
);
const two = fs.readFileSync(testPath);

Expand Down
2 changes: 1 addition & 1 deletion packages/jimp/test/events.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Events', () => {
});

it('initializes with a file', done => {
new Jimp(getTestDir(__dirname) + '/samples/lenna.png')
new Jimp(getTestDir(__dirname) + '/images/lenna.png')
.on('initialized', function() {
this.bitmap.width.should.be.equal(512);
done();
Expand Down
2 changes: 1 addition & 1 deletion packages/jimp/test/exif.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const jimp = configure({ plugins: [plugins] }, Jimp);
describe('Exif', function() {
this.timeout(15000);

const imagesDir = getTestDir(__dirname) + '/samples/exif-orientation';
const imagesDir = getTestDir(__dirname) + '/images/exif-orientation';

let imgs;
let firstLandscapeImg;
Expand Down
6 changes: 3 additions & 3 deletions packages/jimp/test/filetypes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import should from 'should';
import { Jimp, getTestDir } from '@jimp/test-utils';

describe('FileType', () => {
const imagesDir = getTestDir(__dirname) + '/samples';
const imagesDir = getTestDir(__dirname) + '/images';

it('write uses original MIME type', async () => {
if (process.env.ENV === 'browser') {
Expand Down Expand Up @@ -128,10 +128,10 @@ describe('FileType', () => {
this.timeout(4000);

const expectedImg = await Jimp.read(
getTestDir(__dirname) + '/samples/windows95.png'
getTestDir(__dirname) + '/images/windows95.png'
);
const image = await Jimp.read(
getTestDir(__dirname) + '/samples/windows95.bmp'
getTestDir(__dirname) + '/images/windows95.bmp'
);

image.bitmap.data.should.be.deepEqual(expectedImg.bitmap.data);
Expand Down
2 changes: 1 addition & 1 deletion packages/jimp/test/hash.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import plugins from '@jimp/plugins';
const jimp = configure({ plugins: [plugins] }, Jimp);

describe('hash', () => {
const imagesDir = getTestDir(__dirname) + '/samples';
const imagesDir = getTestDir(__dirname) + '/images';

it('base 2', async () => {
const image = await jimp.read(imagesDir + '/dice.png');
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes

0 comments on commit bca37a9

Please sign in to comment.