Skip to content

Commit

Permalink
Point
Browse files Browse the repository at this point in the history
  • Loading branch information
andmev committed Sep 30, 2024
1 parent 1597c35 commit 892fd86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 4 additions & 3 deletions __test__/decode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import test from 'ava'
import test from 'ava';
import path from 'path';

import { decode } from '../index.js'
import { decode } from '../index.js';

const dirname = new URL('.', import.meta.url).pathname
const dirname = path.join(new URL('.', import.meta.url).pathname);

test('decode', async (t) => {
await decode(dirname + 'decode.png')
Expand Down
10 changes: 6 additions & 4 deletions __test__/encode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import fs from 'node:fs'
import test from 'ava'
import test from 'ava';
import fs from 'node:fs';
import path from 'path';

import { encode } from '../index.js'
import { encode } from '../index.js';

const dirname = new URL('.', import.meta.url).pathname
const dirname = path.join(new URL('.', import.meta.url).pathname);

test.afterEach(() => {
console.log('dirname', dirname);
const output = dirname + 'output.png'
if (fs.existsSync(output)) {
fs.unlinkSync(output)
Expand Down

0 comments on commit 892fd86

Please sign in to comment.