feat: 유닛테스트 준비
This commit is contained in:
+2
-1
@@ -66,4 +66,5 @@ vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/*
|
||||
ingame/js/*
|
||||
ingame/css/*
|
||||
gateway/js/*
|
||||
gateway/css/*
|
||||
gateway/css/*
|
||||
vendor/phpunit/phpunit/.phpunit.result.cache
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { assert } from 'chai';
|
||||
|
||||
describe('hello', ()=>{
|
||||
it('hello1', ()=>{
|
||||
assert.equal(2, 1+1);
|
||||
});
|
||||
});
|
||||
+5
-2
@@ -4,7 +4,9 @@
|
||||
"description": "",
|
||||
"main": "js/index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"test": "npm-run-all test-php-gateway test-ts",
|
||||
"test-php-gateway": "vendor/bin/phpunit --bootstrap vendor/autoload.php tests",
|
||||
"test-ts": "node --loader ts-node/esm ./node_modules/.bin/mocha hwe/test-ts/**/*.test.ts",
|
||||
"build": "webpack",
|
||||
"buildDev": "webpack --mode=development",
|
||||
"watch": "webpack watch --mode=development",
|
||||
@@ -84,6 +86,7 @@
|
||||
"file-loader": "^6.2.0",
|
||||
"mini-css-extract-plugin": "^2.5.3",
|
||||
"mocha": "^9.2.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss-discard-duplicates": "^5.0.3",
|
||||
"postcss-import": "^14.0.2",
|
||||
"postcss-loader": "^6.2.1",
|
||||
@@ -91,7 +94,7 @@
|
||||
"sass": "^1.49.8",
|
||||
"sass-loader": "^12.6.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"ts-node": "^10.5.0",
|
||||
"ts-node": "^10.6.0",
|
||||
"typescript": "^4.5.5",
|
||||
"url-loader": "^4.1.1",
|
||||
"vue-eslint-parser": "^8.2.0",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class BasicTest extends PHPUnit\Framework\TestCase{
|
||||
public function testHelloWorld(){
|
||||
$this->assertEquals(1+1, 2);
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -72,5 +72,8 @@
|
||||
/* Advanced Options */
|
||||
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
||||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"**/*.test.ts"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user