Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowflake107 committed May 28, 2021
1 parent 900421c commit 1f534c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions __tests__/ImageMaker.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ImageMaker } from '../src/index';
import FileType from "file-type";
import FileType from 'file-type';

const IMAGE_PATH = `${__dirname}/assets/img.jpg`;

describe('Canvacord ImageMaker', () => {
test('ImageMaker.triggered() should be GIF', () => {
return ImageMaker.triggered(IMAGE_PATH).then(async (res) => {
expect((await (FileType.fromBuffer(res))).mime).toBe('image/gif');
expect((await FileType.fromBuffer(res)).mime).toBe('image/gif');
});
});

Expand All @@ -18,7 +18,7 @@ describe('Canvacord ImageMaker', () => {

test('ImageMaker.beautiful() should be png', () => {
return ImageMaker.beautiful(IMAGE_PATH).then(async (res) => {
expect((await (FileType.fromBuffer(res))).mime).toBe('image/png');
expect((await FileType.fromBuffer(res)).mime).toBe('image/png');
});
});
});
9 changes: 4 additions & 5 deletions __tests__/Photoshop.test.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { Photoshop } from '../src/index';
import FileType from "file-type";
import FileType from 'file-type';

const IMAGE_PATH = `${__dirname}/assets/img.jpg`;

describe('Canvacord Photoshop', () => {
test('ImageMaker.color() should be PNG', () => {
return Photoshop.color("#FF0000", 16, 16).then(async (res) => {
expect((await (FileType.fromBuffer(res))).mime).toBe('image/png');
return Photoshop.color('#FF0000', 16, 16).then(async (res) => {
expect((await FileType.fromBuffer(res)).mime).toBe('image/png');
});
});

test('ImageMaker.colorfy() should be PNG', () => {
return Photoshop.colorfy(IMAGE_PATH, "#FF0000").then((res) => {
return Photoshop.colorfy(IMAGE_PATH, '#FF0000').then((res) => {
expect(res).toBeInstanceOf(Buffer);
});
});

});

0 comments on commit 1f534c2

Please sign in to comment.