fix(core): update

This commit is contained in:
2023-01-09 18:17:33 +01:00
parent 0ca656306a
commit 746447ec44
17 changed files with 5087 additions and 2269 deletions

View File

@ -1,11 +1,17 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartjimp from '../ts/index';
import * as smartjimp from '../ts/index.js';
import * as smartfile from '@pushrocks/smartfile';
let testSmartJimp: smartjimp.SmartJimp;
tap.test('first test', async () => {
testSmartJimp = new smartjimp.SmartJimp();
expect(testSmartJimp).to.be.instanceOf(smartjimp.SmartJimp);
expect(testSmartJimp).toBeInstanceOf(smartjimp.SmartJimp);
});
tap.test('should be able to create a master', async () => {
const convertedAsset = await testSmartJimp.getFromUrl('https://images.unsplash.com/photo-1673276628202-737bf3020ac2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3774&q=80', {width: 200});
(await smartfile.Smartfile.fromBuffer('.nogit/result.jpeg', convertedAsset)).write();
});
tap.start();