Skip to content

Commit

Permalink
test: reorganize redefines/replaces specs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Dec 21, 2022
1 parent 7323bb4 commit befb7b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Redefine",
"name": "Redefines Base",
"uri": "http://redefine",
"prefix": "r",
"prefix": "b",
"types": [
{
"name": "Base",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Replace",
"uri": "http://replace",
"prefix": "r",
"name": "Replaces Base",
"uri": "http://replaces",
"prefix": "b",
"types": [
{
"name": "Base",
Expand Down
12 changes: 6 additions & 6 deletions test/spec/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ describe('extension', function() {

describe('property replacement', function() {

var model = createModel([ 'replace' ]);
var model = createModel([ 'replaces/base' ]);

it('should replace in descriptor', function() {

// given
var Extension = model.getType('r:Extension');
var Extension = model.getType('b:Extension');

// when
var descriptor = model.getElementDescriptor(Extension),
Expand All @@ -197,7 +197,7 @@ describe('extension', function() {
'id'
]);

expect(descriptor.propertiesByName['r:id'].type).to.eql('Integer');
expect(descriptor.propertiesByName['b:id'].type).to.eql('Integer');
expect(descriptor.propertiesByName['id'].type).to.eql('Integer');
});

Expand All @@ -206,12 +206,12 @@ describe('extension', function() {

describe('property redefinition', function() {

var model = createModel([ 'redefine' ]);
var model = createModel([ 'redefines/base' ]);

it('should redefine in descriptor', function() {

// given
var Extension = model.getType('r:Extension');
var Extension = model.getType('b:Extension');

// when
var descriptor = model.getElementDescriptor(Extension),
Expand All @@ -226,7 +226,7 @@ describe('extension', function() {
'value'
]);

expect(descriptor.propertiesByName['r:id'].type).to.eql('Integer');
expect(descriptor.propertiesByName['b:id'].type).to.eql('Integer');
expect(descriptor.propertiesByName['id'].type).to.eql('Integer');
});

Expand Down

0 comments on commit befb7b0

Please sign in to comment.