Skip to content

Commit

Permalink
(fix) Post-release test changes + Latest Ergo fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <[email protected]>
  • Loading branch information
jeromesimeon committed Mar 21, 2019
1 parent 9f60a84 commit 022bdba
Show file tree
Hide file tree
Showing 46 changed files with 262 additions and 633 deletions.
738 changes: 177 additions & 561 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cicero-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@accordproject/cicero-core": "0.11.0",
"@accordproject/cicero-engine": "0.11.0",
"@accordproject/cicero-tools": "0.11.0",
"@accordproject/ergo-compiler": "0.7.0",
"@accordproject/ergo-compiler": "0.7.3-20190321033913",
"composer-concerto": "0.70.0",
"uuid": "3.3.2",
"yargs": "9.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "ergo",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"webpack-cli": "^3.1.0"
},
"dependencies": {
"@accordproject/ergo-compiler": "0.7.0",
"@accordproject/ergo-compiler": "0.7.3-20190321033913",
"acorn": "^5.1.2",
"axios": "0.18.0",
"composer-concerto": "0.70.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/alltypes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description": "Test all types",
"cicero": {
"template": "clause",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"cicero": {
"template": "contract",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/bad-locale/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/bad-logic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "ergo",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/bad-property/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/conga/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"cicero": {
"template": "contract",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/ergo-js-inside/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "ergo",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/helloemit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "ergo",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"hellomodule","version":"0.1.0","description":"This is the Hello World of Accord Protocol Templates (with two Ergo modules).","cicero":{"template":"clause","language":"ergo","version":"^0.10.0"}}
{"name":"hellomodule","version":"0.1.0","description":"This is the Hello World of Accord Protocol Templates (with two Ergo modules).","cicero":{"template":"clause","language":"ergo","version":"^0.11.0"}}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/hellomodule/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"hellomodule","version":"0.1.0","description":"This is the Hello World of Accord Protocol Templates (with two Ergo modules).","cicero":{"template":"clause","language":"ergo","version":"^0.10.0"}}
{"name":"hellomodule","version":"0.1.0","description":"This is the Hello World of Accord Protocol Templates (with two Ergo modules).","cicero":{"template":"clause","language":"ergo","version":"^0.11.0"}}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/js-ergo-inside/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"cicero": {
"template": "contract",
"language": "ergo",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
Binary file modified packages/cicero-core/test/data/latedeliveryandpenalty.cta
Binary file not shown.
Binary file modified packages/cicero-core/test/data/latedeliveryandpenalty.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "ergo",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/locales-conga/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/no-concepts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/no-logic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/no-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "javascript",
"version": "^0.10.0"
"version": "^0.11.0"
}
}
2 changes: 1 addition & 1 deletion packages/cicero-core/test/data/text-only/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"cicero": {
"template": "clause",
"language": "ergo",
"version": "^0.10.0"
"version": "^0.11.0"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 23 additions & 23 deletions packages/cicero-core/test/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('Metadata', () => {
cicero: {
template: 'contract',
language:'ergo',
version:'0.10.2'
version:'0.11.2'
},
keywords: {},
}, null, {})).should.throw('keywords property in package.json must be an array.');
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('Metadata', () => {
it('should return requested sample', () => {
const md = new Metadata({
name: 'template',
cicero: {language:'ergo',version:'^0.10.0'}
cicero: {language:'ergo',version:'^0.11.0'}
}, null, {
en: 'sample'
});
Expand All @@ -171,7 +171,7 @@ describe('Metadata', () => {
it('should return null if sample is not in the samples', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
should.not.exist(md.getSample('en'));
should.not.exist(md.getSample());
Expand All @@ -181,7 +181,7 @@ describe('Metadata', () => {
it('should return default sample if locale not specified', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {
default: 'sample'
});
Expand All @@ -194,21 +194,21 @@ describe('Metadata', () => {
it('should return default type', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.getTemplateType().should.be.equal(0);
});
it('should return for explicit contract type', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.getTemplateType().should.be.equal(0);
});
it('should return default type', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'clause',language:'ergo',version:'^0.10.0'}
cicero: {template: 'clause',language:'ergo',version:'^0.11.0'}
}, null, {});
md.getTemplateType().should.be.equal(1);
});
Expand All @@ -226,7 +226,7 @@ describe('Metadata', () => {
it('should satisfy when target version has a lower patch number as cicero version', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.satisfiesTargetVersion(ciceroVersion).should.be.equal(true);
});
Expand All @@ -241,49 +241,49 @@ describe('Metadata', () => {
it('should satisfy when target version has a lower patch number as cicero version (with prerelease tag)', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.satisfiesTargetVersion('0.10.1-20190114233635').should.be.equal(true);
md.satisfiesTargetVersion('0.11.1-20190114233635').should.be.equal(true);
});
it('should not satisfy when target version has a lower minor number as cicero version', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.targetVersion = '^0.9.0';
md.targetVersion = '^0.10.0';
md.satisfiesTargetVersion(ciceroVersion).should.be.equal(false);
});
it('should satisfy when cicero version is a prerelease for a version with patch number 0', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.targetVersion = '^0.9.0';
md.satisfiesTargetVersion('0.10.0-20190114233635').should.be.equal(true);
md.targetVersion = '^0.10.0';
md.satisfiesTargetVersion('0.11.0-20190114233635').should.be.equal(true);
});
it('should satisfy when cicero version is a prerelease for a version with patch number higher than 0', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.targetVersion = '^0.9.0';
md.satisfiesTargetVersion('0.10.1-20190114233635').should.be.equal(false);
md.targetVersion = '^0.10.0';
md.satisfiesTargetVersion('0.11.1-20190114233635').should.be.equal(false);
});
it('should not satisfy when target version has a higher minor number as cicero version', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.targetVersion = '^0.11.0';
md.targetVersion = '^0.12.0';
md.satisfiesTargetVersion(ciceroVersion).should.be.equal(false);
});
it('should not satisfy when target version has a higher minor number as cicero version (with prerelease tag)', () => {
const md = new Metadata({
name: 'template',
cicero: {template: 'contract',language:'ergo',version:'^0.10.0'}
cicero: {template: 'contract',language:'ergo',version:'^0.11.0'}
}, null, {});
md.targetVersion = '^0.11.0';
md.satisfiesTargetVersion('0.10.0-20190114233635').should.be.equal(false);
md.targetVersion = '^0.12.0';
md.satisfiesTargetVersion('0.11.0-20190114233635').should.be.equal(false);
});
});
});
Loading

0 comments on commit 022bdba

Please sign in to comment.