From 1e64046069e8fd432dfa9cb0dcdce8a858eac00b Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Sun, 7 Feb 2021 20:26:32 +0100 Subject: [PATCH] Changed jasmine settings and added tsconfig for specs --- .gitignore | 2 ++ package.json | 4 ++-- spec/support/jasmine.json | 2 +- spec/utils.ts | 2 +- tsconfig.spec.json | 9 +++++++++ 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 tsconfig.spec.json diff --git a/.gitignore b/.gitignore index db6e9e1..695d4b8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ certificates/ *.js lib/ examples/build +spec/**/*.js +spec/**/*.js.map diff --git a/package.json b/package.json index a88bdf0..f99497a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json index 45a4bb4..58037b5 100644 --- a/spec/support/jasmine.json +++ b/spec/support/jasmine.json @@ -1,7 +1,7 @@ { "spec_dir": "spec", "spec_files": [ - "**/index.js" + "**/*.js" ], "stopSpecOnExpectationFailure": false, "random": true diff --git a/spec/utils.ts b/spec/utils.ts index e956f5a..5d3266c 100644 --- a/spec/utils.ts +++ b/spec/utils.ts @@ -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", () => { diff --git a/tsconfig.spec.json b/tsconfig.spec.json new file mode 100644 index 0000000..ae56735 --- /dev/null +++ b/tsconfig.spec.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": true + }, + "include": [ + "spec/**/*", + ] +}