Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
4,927 additions
and
9,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extension": ["ts"], | ||
"spec": "src/**/*.spec.ts", | ||
"require": "ts-node/register", | ||
"node-option": [ | ||
"experimental-specifier-resolution=node", | ||
"loader=ts-node/esm" | ||
] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
// https://jestjs.io/docs/api | ||
import {describe, expect, it } from '@jest/globals'; | ||
import fs from 'fs/promises'; | ||
import { describe, it } from 'mocha'; | ||
import assert from 'assert'; | ||
import fs from 'node:fs/promises'; | ||
import Asset from './Asset.js'; | ||
|
||
describe("Asset", () => { | ||
it("Asset dir exists", async () => { | ||
const asset = new Asset(); | ||
const stat = await fs.stat(asset.pathOf('')); | ||
expect(stat).not.toBeNull; | ||
assert.notEqual(stat, null); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { describe, it } from 'mocha'; | ||
import assert from 'assert'; | ||
|
||
import * as path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
import md5sum from './md5sum.js'; | ||
|
||
const dirname = path.dirname(fileURLToPath(import.meta.url)) | ||
|
||
describe("MD5SUM", () => { | ||
it("test empty", async () => { | ||
const hash = await md5sum(path.join(dirname, 'md5sum.spec.empty.blob')); | ||
assert.equal(hash, 'd41d8cd98f00b204e9800998ecf8427e'); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
server/src/lib/media/Probe.test.ts → server/src/lib/media/Probe.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// https://jestjs.io/docs/api | ||
import {describe, expect, it } from '@jest/globals'; | ||
import { describe, it } from 'mocha'; | ||
import assert from 'assert'; | ||
import * as media from './Probe.js'; | ||
import Asset from '../Asset.js'; | ||
|
||
describe("Media", () => { | ||
it("parse jpeg", async () => { | ||
const filepath = new Asset().pathOf('static/omote/kaede.jpg'); | ||
const r = await media.probe(filepath); | ||
expect(r.width).toEqual(1000); | ||
expect(r.height).toEqual(1000); | ||
assert.equal(r.width, 1000); | ||
assert.equal(r.height, 1000); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters