Skip to content

Commit

Permalink
New unit test for TopSelectorSpecificity metric
Browse files Browse the repository at this point in the history
  • Loading branch information
katiefenn committed Jun 14, 2014
1 parent 3966c83 commit e9f68d1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/TopSelectorSpecificity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var expect = require('chai').expect,
metric = require('../metrics/TopSelectorSpecificity.js');

describe('The top-selector-specificity metric', function () {
it('should count only the specificity of the child selector of a :not identifier', function () {
expect(metric.measure(':not(body)')).to.equal(1);
expect(metric.measure(':not(.sidebar)')).to.equal(10);
expect(metric.measure(':not(h1#main)')).to.equal(101);
});
});

0 comments on commit e9f68d1

Please sign in to comment.