mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
cleanup unused test frameworks
This commit is contained in:
parent
0dd072b9ac
commit
843a2c639b
@ -1,11 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
require: [
|
||||
"ts-node/register",
|
||||
"tsconfig-paths/register",
|
||||
"source-map-support/register"
|
||||
],
|
||||
recursive: true,
|
||||
spec: "test/mocha/*.spec.ts"
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
module.exports = {
|
||||
extension: [
|
||||
".ts"
|
||||
],
|
||||
exclude: [
|
||||
"**/*.d.ts",
|
||||
"test/**",
|
||||
"/*.js"
|
||||
],
|
||||
require: [
|
||||
"ts-node/register"
|
||||
],
|
||||
reporter: [
|
||||
"html",
|
||||
"text"
|
||||
]
|
||||
}
|
||||
@ -6,30 +6,20 @@
|
||||
"precompile": "rimraf app/**/*.js test/**/*.js",
|
||||
"compile": "tsc",
|
||||
"pretest": "rimraf app/**/*.js test/**/*.js",
|
||||
"test:jest": "jest",
|
||||
"test:jest:watch": "jest --watchAll",
|
||||
"test:mocha": "nyc mocha",
|
||||
"test:vitest": "vitest --coverage"
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watchAll"
|
||||
},
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.2.22",
|
||||
"@types/jest": "^29.4.0",
|
||||
"@types/mocha": "^10.0.1",
|
||||
"@types/node": "^18.14.0",
|
||||
"@vitest/coverage-istanbul": "^0.28.5",
|
||||
"chai": "^4.3.4",
|
||||
"jest": "^29.4.3",
|
||||
"mocha": "^10.2.0",
|
||||
"nyc": "~15.1.0",
|
||||
"rimraf": "^4.1.2",
|
||||
"source-map-support": "^0.5.20",
|
||||
"ts-jest": "^29.0.5",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"typescript": "^4.4.4",
|
||||
"vite-tsconfig-paths": "^4.0.5",
|
||||
"vitest": "^0.28.5"
|
||||
"typescript": "^4.4.4"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
import { expect } from 'chai';
|
||||
import { Item, GildedRose } from '@/gilded-rose';
|
||||
|
||||
describe('Gilded Rose', () => {
|
||||
it('should foo', () => {
|
||||
const gildedRose = new GildedRose([new Item('foo', 0, 0)]);
|
||||
const items = gildedRose.updateQuality();
|
||||
expect(items[0].name).to.equal('fixme');
|
||||
});
|
||||
});
|
||||
@ -1,30 +0,0 @@
|
||||
import { execSync } from 'node:child_process';
|
||||
import { Item, GildedRose } from '@/gilded-rose';
|
||||
|
||||
/**
|
||||
* This test uses Vitest Snapshot, similar to [Jest Snapshot](https://goo.gl/fbAQLP).
|
||||
*
|
||||
* There are two test cases here with different styles:
|
||||
* <li>"foo" is more similar to the unit test from the 'Java' version
|
||||
* <li>"thirtyDays" is more similar to the TextTest from the 'Java' version
|
||||
*
|
||||
* I suggest choosing one style to develop and deleting the other.
|
||||
*/
|
||||
|
||||
describe('Gilded Rose Approval', () => {
|
||||
it('should foo', () => {
|
||||
const gildedRose = new GildedRose([new Item('foo', 0, 0)]);
|
||||
const items = gildedRose.updateQuality();
|
||||
|
||||
expect(items).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should thirtyDays', () => {
|
||||
const consoleOutput = execSync(
|
||||
'ts-node test/golden-master-text-test.ts 30',
|
||||
{ encoding: 'utf-8' }
|
||||
);
|
||||
|
||||
expect(consoleOutput).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@ -1,9 +0,0 @@
|
||||
import { Item, GildedRose } from '@/gilded-rose';
|
||||
|
||||
describe('Gilded Rose', () => {
|
||||
it('should foo', () => {
|
||||
const gildedRose = new GildedRose([new Item('foo', 0, 0)]);
|
||||
const items = gildedRose.updateQuality();
|
||||
expect(items[0].name).toBe('fixme');
|
||||
});
|
||||
});
|
||||
@ -1,14 +0,0 @@
|
||||
import {defineConfig} from 'vitest/config';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tsconfigPaths()],
|
||||
test: {
|
||||
globals: true,
|
||||
include: ['test/vitest/**/*.{spec,test}.{js,ts}'],
|
||||
coverage: {
|
||||
provider: 'istanbul',
|
||||
reporter: ['text', 'html']
|
||||
}
|
||||
},
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user