Skip to content

Commit 2e86302

Browse files
committed
test: use gitsubmodule for conformance features and reorganize test dir
Signed-off-by: Lance Ball <[email protected]>
1 parent f61608d commit 2e86302

21 files changed

+41
-117
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "conformance"]
2+
path = conformance
3+
url = [email protected]:cloudevents/conformance.git

conformance

Submodule conformance added at dcd8f60

conformance/http-protocol-binding.feature

Lines changed: 0 additions & 80 deletions
This file was deleted.

cucumber.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// cucumber.js
22
let common = [
3-
"conformance/**/*.feature", // Specify our feature files
3+
"conformance/features/http-protocol-binding.feature", // Specify our feature files
44
"--require-module ts-node/register", // Load TypeScript module
5-
"--require conformance/support/steps.ts", // Load step definitions
5+
"--require test/conformance/steps.ts", // Load step definitions
66
"--format progress-bar", // Load custom formatter
77
"--format node_modules/cucumber-pretty", // Load custom formatter
88
].join(" ");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "eslint 'src/**/*.{js,ts}' 'test/**/*.{js,ts}'",
1010
"lint:fix": "eslint 'src/**/*.{js,ts}' 'test/**/*.{js,ts}' --fix",
1111
"pretest": "npm run lint && npm run conformance",
12-
"test": "mocha --require ts-node/register ./test/**/*.ts",
12+
"test": "mocha --require ts-node/register ./test/integration/**/*.ts",
1313
"conformance": "cucumber-js -p default",
1414
"coverage": "nyc --reporter=lcov --reporter=text npm run test",
1515
"coverage-publish": "wget -qO - https://coverage.codacy.com/get.sh | bash -s report -l JavaScript -r coverage/lcov.info",
File renamed without changes.

test/cloud_event_test.ts renamed to test/integration/cloud_event_test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect } from "chai";
2-
import { CloudEvent, Version } from "../src";
3-
import { CloudEventV03 } from "../src/event/v03";
4-
import { CloudEventV1 } from "../src/event/v1";
2+
import { CloudEvent, Version } from "../../src";
3+
import { CloudEventV03 } from "../../src/event/v03";
4+
import { CloudEventV1 } from "../../src/event/v1";
55

66
const type = "org.cncf.cloudevents.example";
77
const source = "http://unit.test";

test/constants_test.ts renamed to test/integration/constants_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from "chai";
2-
import CONSTANTS from "../src/constants";
2+
import CONSTANTS from "../../src/constants";
33

44
describe("Constants exposed by top level exports", () => {
55
it("Exports an ENCODING_BASE64 constant", () => {

test/http_binding_03.ts renamed to test/integration/http_binding_03.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import "mocha";
22
import { expect } from "chai";
33
import nock from "nock";
44

5-
import { emitBinary, emitStructured } from "../src/transport/http";
6-
import { CloudEvent, Version } from "../src";
5+
import { emitBinary, emitStructured } from "../../src/transport/http";
6+
import { CloudEvent, Version } from "../../src";
77
import { AxiosResponse } from "axios";
88

99
const type = "com.github.pull.create";

test/http_binding_1.ts renamed to test/integration/http_binding_1.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import "mocha";
33
import { expect } from "chai";
44
import nock from "nock";
55

6-
import { CloudEvent, Version } from "../src";
7-
import { emitBinary, emitStructured } from "../src/transport/http";
8-
import { asBase64 } from "../src/event/validation/is";
6+
import { CloudEvent, Version } from "../../src";
7+
import { emitBinary, emitStructured } from "../../src/transport/http";
8+
import { asBase64 } from "../../src/event/validation/is";
99
import { AxiosResponse } from "axios";
1010

1111
const type = "com.github.pull.create";

0 commit comments

Comments
 (0)