Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Run Unit Tests
- name: Run Conformance Tests
run: npm test

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"main": "index.js",
"type": "module",
"scripts": {
"test": "npx vitest semantic/specifications/",
"bdd": "cucumber-js --loader ts-node/esm --import semantic/features/support/**/*.ts semantic/features"
"test": "cucumber-js \"semantic/features/**/*.feature\" --loader ts-node/esm --import \"semantic/features/support/**/*.ts\" --tags \"not @skip\""
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@accordproject/concerto-core": "^3.21.0",
"@accordproject/concerto-cto": "^3.22.0",
"fs": "^0.0.1-security",
"path": "^0.12.7",
"vitest": "^3.2.1"
Expand Down
1 change: 1 addition & 0 deletions semantic/features/enums.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Feature: Semantic Validation of Enum Declarations in CTO Models
When I validate the models
Then no error should be thrown

@skip
Scenario: Enum name conflicts with imported enum should throw an error
Given I load the following models:
| model_file | alias |
Expand Down
4 changes: 3 additions & 1 deletion semantic/features/imports.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Feature: Semantic Validation of CTO Model Imports
When I validate the models
Then no error should be thrown

@skip
Scenario: Conflict with imported type name should throw an error
Given I load the following models:
| model_file | alias |
Expand Down Expand Up @@ -39,7 +40,8 @@ Feature: Semantic Validation of CTO Model Imports
| imports/models/MODEL_FILE_002/model_file_002_unique_namespace_imports.cto | main |
When I validate the models
Then no error should be thrown


@skip
Scenario: Duplicate namespace imports should throw an error
Given I load the following models:
| model_file | alias |
Expand Down
1 change: 1 addition & 0 deletions semantic/features/namespaces.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Feature: Semantic Validation of CTO Namespace Imports

@skip
Scenario: Invalid duplicate namespace imports should throw an error
Given I load the following models:
| model_file | alias |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { Given, When, Then } from '@cucumber/cucumber';
import { loadCTO } from './utils/loadCTO.ts';
import { Parser } from '@accordproject/concerto-cto';
import { ModelFile } from '@accordproject/concerto-core';
import assert from 'assert';

Given('I load the following models:', function (dataTable) {
for (const row of dataTable.hashes()) {
const modelContent = loadCTO(row.model_file);
try {
this.modelManager.addCTOModel(modelContent, row.model_file, true);
// this.modelManager.addCTOModel(modelContent, row.model_file, true);
const ast = Parser.parse(modelContent, row.model_file);
const modelFile = new ModelFile(this.modelManager, ast, modelContent, row.model_file);
this.modelManager.addModelFile(modelFile, null, modelFile.getName(), true);
} catch (err) {
this.error = err as Error;
break;
Expand Down
330 changes: 0 additions & 330 deletions semantic/specifications/concepts/tests/concepts.test.js

This file was deleted.

63 changes: 0 additions & 63 deletions semantic/specifications/enums/tests/enums.test.js

This file was deleted.

70 changes: 0 additions & 70 deletions semantic/specifications/imports/tests/imports.test.js

This file was deleted.

56 changes: 0 additions & 56 deletions semantic/specifications/maps/tests/maps.test.js

This file was deleted.

28 changes: 0 additions & 28 deletions semantic/specifications/namespaces/tests/namespaces.test.js

This file was deleted.

84 changes: 0 additions & 84 deletions semantic/specifications/scalars/tests/scalars.test.js

This file was deleted.