Browse Source

Add unit test files to lint.

And fix the lint warnings from obj_spec.js.
Kalervo Kujala 14 years ago
parent
commit
168e5db2fd
  1. 4
      Makefile
  2. 8
      test/unit/obj_spec.js

4
Makefile

@ -138,8 +138,8 @@ browser-test:
# To install gjslint, see: # To install gjslint, see:
# #
# <http://code.google.com/closure/utilities/docs/linter_howto.html> # <http://code.google.com/closure/utilities/docs/linter_howto.html>
SRC_DIRS := . src utils web test examples/helloworld extensions/firefox \ SRC_DIRS := . src utils web test test/unit examples/helloworld \
extensions/firefox/components extensions/chrome extensions/firefox extensions/firefox/components extensions/chrome
GJSLINT_FILES = $(foreach DIR,$(SRC_DIRS),$(wildcard $(DIR)/*.js)) GJSLINT_FILES = $(foreach DIR,$(SRC_DIRS),$(wildcard $(DIR)/*.js))
lint: lint:
gjslint --nojsdoc $(GJSLINT_FILES) gjslint --nojsdoc $(GJSLINT_FILES)

8
test/unit/obj_spec.js

@ -3,11 +3,11 @@
'use strict'; 'use strict';
describe("obj", function() { describe('obj', function() {
describe("Name", function() { describe('Name', function() {
it("should retain the given name", function() { it('should retain the given name', function() {
var givenName = "Font"; var givenName = 'Font';
var name = new Name(givenName); var name = new Name(givenName);
expect(name.name).toEqual(givenName); expect(name.name).toEqual(givenName);
}); });

Loading…
Cancel
Save