Skip to content

Commit

Permalink
spelling: falsy
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Sep 24, 2017
1 parent 23254a4 commit 76570f6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion spec/components/defaultLoaderBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Components: Default loader', function() {
}).toThrow();
});

it('Throws if you try to register a falsey value', function() {
it('Throws if you try to register a falsy value', function() {
expect(function() {
ko.components.register(testComponentName, null);
}).toThrow();
Expand Down
2 changes: 1 addition & 1 deletion spec/defaultBindings/foreachBehaviors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Binding: Foreach', function() {
beforeEach(jasmine.prepareTestNode);

it('Should remove descendant nodes from the document (and not bind them) if the value is falsey', function() {
it('Should remove descendant nodes from the document (and not bind them) if the value is falsy', function() {
testNode.innerHTML = "<div data-bind='foreach: someItem'><span data-bind='text: someItem.nonExistentChildProp'></span></div>";
expect(testNode.childNodes[0].childNodes.length).toEqual(1);
ko.applyBindings({ someItem: null }, testNode);
Expand Down
2 changes: 1 addition & 1 deletion spec/defaultBindings/hasfocusBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ko.utils.arrayForEach(['hasfocus', 'hasFocus'], function(binding) {
expect(didFocusAgain).toEqual(false);

// Similarly, when the elem is already blurred, changing the model value to a different
// falsey value shouldn't cause any additional blur events
// falsy value shouldn't cause any additional blur events
model.isFocused(false);
var didBlurAgain = false;
ko.utils.registerEventHandler(testNode.childNodes[0], "focusout", function() { didBlurAgain = true });
Expand Down
2 changes: 1 addition & 1 deletion spec/defaultBindings/ifBehaviors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Binding: If', function() {
beforeEach(jasmine.prepareTestNode);

it('Should remove descendant nodes from the document (and not bind them) if the value is falsey', function() {
it('Should remove descendant nodes from the document (and not bind them) if the value is falsy', function() {
testNode.innerHTML = "<div data-bind='if: someItem'><span data-bind='text: someItem.nonExistentChildProp'></span></div>";
expect(testNode.childNodes[0].childNodes.length).toEqual(1);
ko.applyBindings({ someItem: null }, testNode);
Expand Down
6 changes: 3 additions & 3 deletions spec/defaultBindings/ifnotBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Binding: Ifnot', function() {
expect(testNode.childNodes[0].childNodes.length).toEqual(0);
});

it('Should leave descendant nodes in the document (and bind them) if the value is falsey, independently of the active template engine', function() {
it('Should leave descendant nodes in the document (and bind them) if the value is falsy, independently of the active template engine', function() {
this.after(function() { ko.setTemplateEngine(new ko.nativeTemplateEngine()); });

ko.setTemplateEngine(new ko.templateEngine()); // This template engine will just throw errors if you try to use it
Expand All @@ -19,7 +19,7 @@ describe('Binding: Ifnot', function() {
expect(testNode.childNodes[0].childNodes[0]).toContainText("Child prop value");
});

it('Should leave descendant nodes unchanged if the value is falsey and remains falsey when changed', function() {
it('Should leave descendant nodes unchanged if the value is falsy and remains falsy when changed', function() {
var someItem = ko.observable(false);
testNode.innerHTML = "<div data-bind='ifnot: someItem'><span data-bind='text: someItem()'></span></div>";
var originalNode = testNode.childNodes[0].childNodes[0];
Expand All @@ -29,7 +29,7 @@ describe('Binding: Ifnot', function() {
expect(testNode.childNodes[0].childNodes[0]).toContainText("false");
expect(testNode.childNodes[0].childNodes[0]).toEqual(originalNode);

// Change the value to a different falsey value
// Change the value to a different falsy value
someItem(0);
expect(testNode.childNodes[0].childNodes[0]).toContainText("0");
expect(testNode.childNodes[0].childNodes[0]).toEqual(originalNode);
Expand Down
2 changes: 1 addition & 1 deletion spec/defaultBindings/withBehaviors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Binding: With', function() {
beforeEach(jasmine.prepareTestNode);

it('Should remove descendant nodes from the document (and not bind them) if the value is falsey', function() {
it('Should remove descendant nodes from the document (and not bind them) if the value is falsy', function() {
testNode.innerHTML = "<div data-bind='with: someItem'><span data-bind='text: someItem.nonExistentChildProp'></span></div>";
expect(testNode.childNodes[0].childNodes.length).toEqual(1);
ko.applyBindings({ someItem: null }, testNode);
Expand Down
2 changes: 1 addition & 1 deletion spec/nodePreprocessingBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Node preprocessing', function() {
ko.bindingProvider.instance = new preprocessingBindingProvider();
});

it('Can leave the nodes unchanged by returning a falsey value', function() {
it('Can leave the nodes unchanged by returning a falsy value', function() {
ko.bindingProvider.instance.preprocessNode = function(node) { return null; };
testNode.innerHTML = "<p data-bind='text: someValue'></p>";
ko.applyBindings({ someValue: 'hello' }, testNode);
Expand Down
2 changes: 1 addition & 1 deletion spec/utilsBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ describe('Function.bind', function() {
expect(bound('a')).toEqual([object, 'a']);
});

it('should accept a falsey `thisArg` argument', function () {
it('should accept a falsy `thisArg` argument', function () {
ko.utils.arrayForEach(['', 0, false, NaN], function (value) {
var bound = fn.bind(value);
expect(bound()[0].constructor).toEqual(Object(value).constructor);
Expand Down

0 comments on commit 76570f6

Please sign in to comment.