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
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
2 changes: 1 addition & 1 deletion MiniBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
'use strict';

import { $A } from 'miniprototype.js';
import { $A } from './miniprototype.js';

// Non-Lively Compatibility
export var Global = {};
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"test": "tests"
},
"scripts": {
"test": "karma start --single-run",
"test": "npm run test-node && npm run test-karma",
"test-karma": "karma start --single-run",
"test-node": "mocha tests --compilers js:babel-core/register --require tests/globalChai.js",
"test-chrome-only": "karma start --single-run --browsers Chrome",
"test-continuously": "karma start",
"test-continuously-chrome-only": "karma start --browsers Chrome",
Expand Down
3 changes: 2 additions & 1 deletion tests/LayerInliningTests.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

import { default as cop } from 'copv2/Layers.js';
import { default as cop } from '../copv2/Layers.js';
import '../MiniBase.js'

cop.tests = {};
cop.tests.LayerInliningTests = {};
Expand Down
8 changes: 5 additions & 3 deletions tests/LayerTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
'use strict';

import { default as cop, Layer, LayerableObject, Global } from 'copv2/Layers.js';
import { default as cop, Layer, LayerableObject, Global } from '../copv2/Layers.js';

// COP Example from: Hirschfeld, Costanza, Nierstrasz. 2008.
// Context-oriented Programming. JOT)
Expand Down Expand Up @@ -827,9 +827,11 @@ describe('cop', function () {
.refineObject(o, { say: function(a) {return cop.proceed(a + " World") + "!"}})
assert.equal(o.say("Hello"), "Say: Hello", "test is broken");
cop.withLayers([l], function() {
console.group("SayHello");
if (typeof console.group !== 'undefined')
console.group("SayHello");
var result = o.say("Hello")
console.groupEnd("SayHello");
if (typeof console.group !== 'undefined')
console.groupEnd("SayHello");
assert.equal(result, "Say: Hello World!", "adapting arguments is broken");
}.bind(this));
});
Expand Down
2 changes: 1 addition & 1 deletion tests/TracingTests.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { default as cop } from 'copv2/Layers';
import { default as cop } from '../copv2/Layers';

function TestCase() {}; // TODO: get rid of this
TestCase.subclass('cop.tests.TracingTests.TracerTest',
Expand Down
3 changes: 3 additions & 0 deletions tests/globalChai.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// only to be run with node (or rather mocha), not in a browser

global.chai = require('chai');