Skip to content

Commit

Permalink
#338 - Fix test for angular 1.5.x and officially support angular 1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jtblin committed Apr 23, 2016
1 parent bd89ab7 commit 87e4419
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
9 changes: 2 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,14 @@
"tests"
],
"dependencies": {
"angular": "1.4.x",
"angular": "1.x",
"Chart.js": "~2.0.0"
},
"devDependencies": {
"angular-bootstrap": "~0.11.0",
"angular-mocks": "1.4.x",
"angular-mocks": "~1.x",
"font-awesome": "~4.1.0",
"rainbow": "~1.1.9",
"requirejs": "~2.1.20"
},
"resolutions": {
"Chart.js": "~2.0.0",
"angular": "1.x",
"angular-mocks": "1.3.10"
}
}
2 changes: 1 addition & 1 deletion examples/charts.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h3>Dependencies</h3>
This repository contains a set of <strong>native AngularJS directives</strong> for Chart.js. The <strong>only required dependencies</strong> are:
</p>
<ul>
<li><a href="http://angularjs.org" target="_blank">AngularJS</a> (tested with 1.2.x, 1.3.x and 1.4.x although it probably works with older versions)</li>
<li><a href="http://angularjs.org" target="_blank">AngularJS</a> (tested with 1.2.x, 1.3.x, 1.4.x and 1.5.x although it probably works with older versions)</li>
<li><a href="http://chartjs.org" target="_blank">Chart.js</a> (requires Chart.js 2.0.x).</li>
</ul>
<h3>Files to download</h3>
Expand Down
2 changes: 1 addition & 1 deletion examples/charts.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h3>Dependencies</h3>
This repository contains a set of <strong>native AngularJS directives</strong> for Chart.js. The <strong>only required dependencies</strong> are:
</p>
<ul>
<li><a href="http://angularjs.org" target="_blank">AngularJS</a> (tested with 1.2.x, 1.3.x and 1.4.x although it probably works with older versions)</li>
<li><a href="http://angularjs.org" target="_blank">AngularJS</a> (tested with 1.2.x, 1.3.x, 1.4.x and 1.5.x although it probably works with older versions)</li>
<li><a href="http://chartjs.org" target="_blank">Chart.js</a> (requires Chart.js 2.0.x).</li>
</ul>
<h3>Files to download</h3>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"webshot": "^0.18.0"
},
"dependencies": {
"angular": "~1.4.5",
"angular": "1.x",
"chart.js": "~2.0.0"
}
}
10 changes: 4 additions & 6 deletions test/test.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,12 @@ describe('Unit testing', function () {
[28, 48, 40, 19, 86, 27, 90]
];

var mock = sandbox.mock(scope);
// cannot get a hold of the child scope as it isn't created yet
// so cannot be more precise on expectations
mock.expects('$watch').atLeast(3);

var spy = sandbox.spy(scope, '$watch');
$compile(markup)(scope);

mock.verify();
// cannot get a hold of the child scope as it isn't created yet
// so cannot be more precise on expectations
expect(spy.calledThrice).to.be.true;
});

it('creates the chart only once', function () {
Expand Down

0 comments on commit 87e4419

Please sign in to comment.