Skip to content

Commit

Permalink
0.2.9: logger emit messages, config.check is false by default
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Aug 20, 2015
1 parent b2b73ad commit 3b99615
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 23 deletions.
46 changes: 31 additions & 15 deletions dist/milo.bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "milojs",
"version": "0.2.8",
"version": "0.2.9",
"description": "Browser/nodejs reactive programming and data driven DOM manipulation with modular components.",
"keywords": [
"framework",
Expand Down Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"base32": "git://github.com/milojs/base32-js",
"milo-core": "^0.1.19"
"milo-core": "0.2.1"
},
"devDependencies": {
"async": "~0.2.9",
Expand Down
15 changes: 14 additions & 1 deletion test/abstract/faceted_object_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
var FacetedObject = require('../../lib/abstract/faceted_object')
, Facet = require('../../lib/abstract/facet')
, assert = require('assert')
, _ = require('milo-core').proto;
, _ = require('milo-core').proto
, config = require('../../lib/config');


describe('FacetedObject class', function() {
var factory = FacetedObject.createFacetedClass.bind(FacetedObject);
Expand All @@ -14,6 +16,17 @@ describe('FacetedObject class', function() {

var MyFacet = _.createSubclass(Facet, 'MyFacet');


before(function() {
config({ check: true });
});


after(function() {
config({ check: false });
});


it('should define a factory createFacetedClass that creates classes of faceted objects', function() {
var TestFacetedClass = factory('TestFacetedClass', facetsClasses, {
facet: {
Expand Down
11 changes: 10 additions & 1 deletion test/abstract/registry_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

var ClassRegistry = require('../../lib/abstract/registry.js')
, _ = require('milo-core').proto
, assert = require('assert');
, assert = require('assert')
, config = require('../../lib/config');

describe('ClassRegistry class', function() {
var registry = new ClassRegistry(Object);

before(function() {
config({ check: true });
});

after(function() {
config({ check: false });
});

beforeEach(function() {
registry.clean();
});
Expand Down
11 changes: 10 additions & 1 deletion test/attributes/a_bind_test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
'use strict';

var BindAttribute = require('../../lib/attributes/a_bind')
, assert = require('assert');
, assert = require('assert')
, config = require('../../lib/config');


describe('BindAttribute class', function() {
before(function() {
config({ check: true });
});

after(function() {
config({ check: false });
});

it('should have parse and validate methods', function() {
var elMock = {
attributes: {
Expand Down
11 changes: 10 additions & 1 deletion test/check_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
var _ = require('milo-core').proto
, assert = require('assert')
, check = require('milo-core').util.check
, Match = check.Match;
, Match = check.Match
, config = require('../lib/config');

describe('check module', function() {
var notDefined
Expand Down Expand Up @@ -42,6 +43,14 @@ describe('check module', function() {
undefined
];

before(function() {
config({ check: true });
});

after(function() {
config({ check: false });
});

it('should match.test for different data types', function() {
toTest.forEach(function(val, i) {
assert(Match.test(val[0], val[1]), 'match.test ' + val[2]);
Expand Down
11 changes: 10 additions & 1 deletion test/components/c_facets/cf_registry_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

var facetsRegistry = require('../../../lib/components/c_facets/cf_registry')
, ComponentFacet = require('../../../lib/components/c_facet')
, testRegistry = require('../../utils/test_registry');;
, testRegistry = require('../../utils/test_registry')
, config = require('../../../lib/config');

describe('registry of facets', function() {
before(function() {
config({ check: true });
});

after(function() {
config({ check: false });
});

testRegistry(facetsRegistry, ComponentFacet);
});
11 changes: 10 additions & 1 deletion test/components/c_registry_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

var componentsRegistry = require('../../lib/components/c_registry')
, Component = require('../../lib/components/c_class')
, testRegistry = require('../utils/test_registry');;
, testRegistry = require('../utils/test_registry')
, config = require('../../lib/config');

describe('registry of components', function() {
before(function() {
config({ check: true });
});

after(function() {
config({ check: false });
});

testRegistry(componentsRegistry, Component);
});

0 comments on commit 3b99615

Please sign in to comment.