Changed jasmine settings and added tsconfig for specs

This commit is contained in:
Alexander Cerutti
2021-02-07 20:26:32 +01:00
parent 84d35ec4c2
commit 1e64046069
5 changed files with 15 additions and 4 deletions

2
.gitignore vendored
View File

@@ -7,3 +7,5 @@ certificates/
*.js
lib/
examples/build
spec/**/*.js
spec/**/*.js.map

View File

@@ -8,9 +8,9 @@
"build:all": "npm run build:src && npm run build:examples && npm run build:spec",
"build:src": "rm -rf ./lib && npx tsc -p tsconfig.dist.json",
"build:examples": "cd examples && npm run build",
"build:spec": "rm -rf ./spec/*.js && npx tsc",
"build:spec": "rm -rf ./spec/*.js && rm -rf ./spec/*.js.map && npx tsc -p tsconfig.spec.json",
"prepublishOnly": "npm run build",
"test": "npm run build:spec && jasmine spec/*.js",
"test": "npm run build:spec && npx jasmine",
"example": "npm run build:src && npm --prefix examples run example"
},
"author": "Alexander Patrick Cerutti",

View File

@@ -1,7 +1,7 @@
{
"spec_dir": "spec",
"spec_files": [
"**/index.js"
"**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": true

View File

@@ -1,5 +1,5 @@
import { splitBufferBundle } from "../lib/utils";
import type { BundleUnit } from "../src/schema";
import type { BundleUnit } from "../lib/schema";
describe("splitBufferBundle", () => {
it("should split the bundle in language-organized files buffers and normal files with valid bundleUnit passed", () => {

9
tsconfig.spec.json Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": true
},
"include": [
"spec/**/*",
]
}