Skip to content

Commit

Permalink
Improve test data naming
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-schwarz committed May 29, 2024
1 parent 711b352 commit e55bf4a
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions libs/language-server/src/lib/validation/checks/jayvee-model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ describe('Validation of JayveeModel', () => {
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
1,
'error',
`The name "Pipeline" needs to be unique.`,
`The name "DuplicatePipelineName" needs to be unique.`,
expect.any(Object),
);
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
2,
'error',
`The name "Pipeline" needs to be unique.`,
`The name "DuplicatePipelineName" needs to be unique.`,
expect.any(Object),
);
});
Expand All @@ -85,13 +85,13 @@ describe('Validation of JayveeModel', () => {
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
1,
'error',
`The name "Transform" needs to be unique.`,
`The name "DuplicateTransformName" needs to be unique.`,
expect.any(Object),
);
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
2,
'error',
`The name "Transform" needs to be unique.`,
`The name "DuplicateTransformName" needs to be unique.`,
expect.any(Object),
);
});
Expand All @@ -106,13 +106,13 @@ describe('Validation of JayveeModel', () => {
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
1,
'error',
`The name "ValueType" needs to be unique.`,
`The name "DuplicateValueTypeName" needs to be unique.`,
expect.any(Object),
);
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
2,
'error',
`The name "ValueType" needs to be unique.`,
`The name "DuplicateValueTypeName" needs to be unique.`,
expect.any(Object),
);
});
Expand All @@ -127,13 +127,13 @@ describe('Validation of JayveeModel', () => {
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
1,
'error',
`The name "DuplicateValuetype" needs to be unique.`,
`The name "DuplicateValueTypeName" needs to be unique.`,
expect.any(Object),
);
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
2,
'error',
`The name "DuplicateValuetype" needs to be unique.`,
`The name "DuplicateValueTypeName" needs to be unique.`,
expect.any(Object),
);
});
Expand All @@ -148,13 +148,13 @@ describe('Validation of JayveeModel', () => {
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
1,
'error',
`The name "Constraint" needs to be unique.`,
`The name "DuplicateConstraintName" needs to be unique.`,
expect.any(Object),
);
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
2,
'error',
`The name "Constraint" needs to be unique.`,
`The name "DuplicateConstraintName" needs to be unique.`,
expect.any(Object),
);
});
Expand All @@ -169,13 +169,13 @@ describe('Validation of JayveeModel', () => {
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
1,
'error',
`The name "TestBlock" needs to be unique.`,
`The name "DuplicateBlockTypeName" needs to be unique.`,
expect.any(Object),
);
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
2,
'error',
`The name "TestBlock" needs to be unique.`,
`The name "DuplicateBlockTypeName" needs to be unique.`,
expect.any(Object),
);
});
Expand Down Expand Up @@ -271,13 +271,13 @@ describe('Validation of JayveeModel', () => {
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
1,
'error',
`The name "X" needs to be unique.`,
`The name "DuplicateNameAliased" needs to be unique.`,
expect.any(Object),
);
expect(validationAcceptorMock).toHaveBeenNthCalledWith(
2,
'error',
`The name "X" needs to be unique.`,
`The name "DuplicateNameAliased" needs to be unique.`,
expect.any(Object),
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//
// SPDX-License-Identifier: AGPL-3.0-only

valuetype DuplicateValuetype oftype text {
valuetype DuplicateValueTypeName oftype text {
constraints: [
Constraint,
];
}

builtin valuetype DuplicateValuetype;
builtin valuetype DuplicateValueTypeName;
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
//
// SPDX-License-Identifier: AGPL-3.0-only

builtin blocktype TestBlock {
builtin blocktype DuplicateBlockTypeName {
input default oftype text;
}

builtin blocktype TestBlock {
builtin blocktype DuplicateBlockTypeName {
input default oftype text;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
//
// SPDX-License-Identifier: AGPL-3.0-only

constraint Constraint on text:
constraint DuplicateConstraintName on text:
value.length == 10;

constraint Constraint on text:
constraint DuplicateConstraintName on text:
value.length == 10;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-only

use { DuplicateName as X } from './publishing.jv';
use { DuplicateName as DuplicateNameAliased } from './publishing.jv';

pipeline X {}
pipeline DuplicateNameAliased {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
//
// SPDX-License-Identifier: AGPL-3.0-only

pipeline Pipeline {
pipeline DuplicatePipelineName {
block TestExtractor oftype TestFileExtractor {
}
}

pipeline Pipeline {
pipeline DuplicatePipelineName {
block TestExtractor oftype TestFileExtractor {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
//
// SPDX-License-Identifier: AGPL-3.0-only

transform Transform {
transform DuplicateTransformName {
from inputParam oftype decimal;
to result oftype integer;

result: floor(inputParam);
}

transform Transform {
transform DuplicateTransformName {
from inputParam oftype decimal;
to inputParam oftype integer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
//
// SPDX-License-Identifier: AGPL-3.0-only

valuetype ValueType oftype text {
valuetype DuplicateValueTypeName oftype text {
constraints: [
Constraint,
];
}

valuetype ValueType oftype text {
valuetype DuplicateValueTypeName oftype text {
constraints: [
Constraint,
];
Expand Down

0 comments on commit e55bf4a

Please sign in to comment.