mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
fix tests after merge; remove detectFileType as it behaves erratically
This commit is contained in:
parent
5047619e54
commit
749a587eb2
4 changed files with 5 additions and 11 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -10,5 +10,5 @@ src/core/config/modules/*
|
||||||
src/core/config/OperationConfig.json
|
src/core/config/OperationConfig.json
|
||||||
src/core/operations/index.mjs
|
src/core/operations/index.mjs
|
||||||
src/node/config/OperationConfig.json
|
src/node/config/OperationConfig.json
|
||||||
|
src/node/index.mjs
|
||||||
**/*.DS_Store
|
**/*.DS_Storeg
|
|
@ -29,4 +29,6 @@ export default [
|
||||||
|
|
||||||
"RenderImage",
|
"RenderImage",
|
||||||
"SyntaxHighlighter",
|
"SyntaxHighlighter",
|
||||||
|
|
||||||
|
"DetectFileType",
|
||||||
];
|
];
|
||||||
|
|
|
@ -136,7 +136,7 @@ TestRegister.addApiTests([
|
||||||
|
|
||||||
it("chef.help: returns multiple results", () => {
|
it("chef.help: returns multiple results", () => {
|
||||||
const result = chef.help("base 64");
|
const result = chef.help("base 64");
|
||||||
assert.strictEqual(result.length, 8);
|
assert.strictEqual(result.length, 10);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
it("chef.help: looks in description for matches too", () => {
|
it("chef.help: looks in description for matches too", () => {
|
||||||
|
|
|
@ -956,14 +956,6 @@ smothering ampersand abreast
|
||||||
assert.strictEqual(chef.zlibInflate(chef.zlibDeflate("cut homer wile rooky grits dizen")).toString(), "cut homer wile rooky grits dizen");
|
assert.strictEqual(chef.zlibInflate(chef.zlibDeflate("cut homer wile rooky grits dizen")).toString(), "cut homer wile rooky grits dizen");
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
||||||
it("Detect file type", () => {
|
|
||||||
assert.strictEqual(
|
|
||||||
chef.detectFileType(fs.readFileSync("src/web/static/images/cook_male-32x32.png")).toString(),
|
|
||||||
`File extension: png
|
|
||||||
MIME type: image/png`);
|
|
||||||
}),
|
|
||||||
|
|
||||||
it("extract EXIF", () => {
|
it("extract EXIF", () => {
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
chef.extractEXIF(fs.readFileSync("test/tests/nodeApi/sampleData/pic.jpg")).toString(),
|
chef.extractEXIF(fs.readFileSync("test/tests/nodeApi/sampleData/pic.jpg")).toString(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue