smelly-cli
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -64,3 +64,3 @@ "use strict"; | ||
const smellDetector = new smelly_detector_1.SmellDetector(fileContents, language); | ||
const smells = smellDetector.findAll(); | ||
const smells = smellDetector.findAll().smells; | ||
aggregator.push({ fileName: file, smells, language }); | ||
@@ -78,3 +78,3 @@ } | ||
const smellDetector = new smelly_detector_1.SmellDetector(fileContents, language); | ||
const result = smellDetector.findAll(); | ||
const result = smellDetector.findAll().smells; | ||
if (result.length) { | ||
@@ -81,0 +81,0 @@ result.forEach((e) => { |
{ | ||
"name": "smelly-cli", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"private": false, | ||
@@ -27,2 +27,3 @@ "description": "Find out the smells in your tests, suggestions for correction and the theory behind them", | ||
"ts-loader": "*", | ||
"vitest": "*", | ||
"ts-mocha": "^10.0.0", | ||
@@ -32,9 +33,9 @@ "ts-node": "^10.9.2" | ||
"scripts": { | ||
"compile": "rm -rf build/ && tsc && cp index.js build/", | ||
"compile": "npm run clean && tsc && cp index.js build/", | ||
"watch": "webpack --watch", | ||
"clean": "rm -rf out/ dist/ types/", | ||
"clean": "rm -rf build/ out/ dist/ types/", | ||
"compile-tests": "npm run clean && tsc -p . --outDir out", | ||
"watch-tests": "tsc -p . -w --outDir out", | ||
"lint": "eslint . --ext ts", | ||
"test": "rm -rf smelly-report.html && ts-mocha -p tsconfig.json ./**/**.test.ts", | ||
"test": "rm -rf smelly-report.html && vitest --watch=false ./**/**.test.ts", | ||
"test:watch": "nodemon --exec 'npm run test' --watch 'src/**' --ext 'ts' --delay 5", | ||
@@ -41,0 +42,0 @@ "test:coverage": "nyc --reporter=lcov ts-mocha -p tsconfig.json ts-node/register ./**/**.test.ts", |
@@ -45,3 +45,3 @@ import path from 'path'; | ||
const smellDetector = new SmellDetector(fileContents, language); | ||
const smells = smellDetector.findAll(); | ||
const smells = smellDetector.findAll().smells; | ||
aggregator.push({ fileName: file, smells, language }); | ||
@@ -62,3 +62,3 @@ } | ||
const smellDetector = new SmellDetector(fileContents, language); | ||
const result = smellDetector.findAll(); | ||
const result = smellDetector.findAll().smells; | ||
@@ -65,0 +65,0 @@ if (result.length) { |
@@ -0,4 +1,4 @@ | ||
import { test, describe, expect } from 'vitest'; | ||
import { exec } from "child_process"; | ||
import { promisify } from "util"; | ||
import * as assert from 'assert'; | ||
@@ -9,7 +9,7 @@ const execPromise = promisify(exec); | ||
it('find no smells for a given path', async () => { | ||
test('find no smells for a given path', async () => { | ||
const { stdout } = await execPromise(`npm run cli -- fake-data/no-smells/ javascript --report=html --report-output=$(pwd)`); | ||
assert.equal(true, stdout.includes("Report HTML generated")); | ||
expect(stdout).toContain("Report HTML generated"); | ||
}); | ||
}); |
@@ -20,3 +20,6 @@ { | ||
// "noUnusedParameters": true, /* Report errors on unused parameters. */ | ||
} | ||
}, | ||
"exclude": [ | ||
"test", | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
0
48816
15
22
1179