Skip to content

Commit ec01fb4

Browse files
committed
fix exception message spelling
1 parent 1b3209f commit ec01fb4

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

state-machine.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ StateMachine = {
8787
return function() {
8888

8989
if (this.transition)
90-
throw "event " + name + " innapropriate because previous transition did not complete"
90+
throw "event " + name + " inappropriate because previous transition did not complete"
9191

9292
if (this.cannot(name))
93-
throw "event " + name + " innapropriate in current state " + this.current;
93+
throw "event " + name + " inappropriate in current state " + this.current;
9494

9595
var from = this.current;
9696
var to = map[from];

state-machine.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/test_async.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ test("state transition fired without completing previous transition", function()
240240
fsm.transition(); equals(fsm.current, 'yellow', "warn event should transition from green to yellow");
241241
fsm.panic(); equals(fsm.current, 'yellow', "should still be yellow because we haven't transitioned yet");
242242

243-
raises(fsm.calm.bind(fsm), /event calm innapropriate because previous transition did not complete/);
243+
raises(fsm.calm.bind(fsm), /event calm inappropriate because previous transition did not complete/);
244244

245245
});
246246

test/test_basics.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ test("can & cannot", function() {
119119

120120
//-----------------------------------------------------------------------------
121121

122-
test("innapropriate events", function() {
122+
test("inappropriate events", function() {
123123

124124
var fsm = StateMachine.create({
125125
initial: 'green',
@@ -131,18 +131,18 @@ test("innapropriate events", function() {
131131

132132
equals(fsm.current, 'green', "initial state should be green");
133133

134-
raises(fsm.panic.bind(fsm), /event panic innapropriate in current state green/);
135-
raises(fsm.calm.bind(fsm), /event calm innapropriate in current state green/);
134+
raises(fsm.panic.bind(fsm), /event panic inappropriate in current state green/);
135+
raises(fsm.calm.bind(fsm), /event calm inappropriate in current state green/);
136136

137137
fsm.warn();
138138
equals(fsm.current, 'yellow', "current state should be yellow");
139-
raises(fsm.warn.bind(fsm), /event warn innapropriate in current state yellow/);
140-
raises(fsm.calm.bind(fsm), /event calm innapropriate in current state yellow/);
139+
raises(fsm.warn.bind(fsm), /event warn inappropriate in current state yellow/);
140+
raises(fsm.calm.bind(fsm), /event calm inappropriate in current state yellow/);
141141

142142
fsm.panic();
143143
equals(fsm.current, 'red', "current state should be red");
144-
raises(fsm.warn.bind(fsm), /event warn innapropriate in current state red/);
145-
raises(fsm.panic.bind(fsm), /event panic innapropriate in current state red/);
144+
raises(fsm.warn.bind(fsm), /event warn inappropriate in current state red/);
145+
raises(fsm.panic.bind(fsm), /event panic inappropriate in current state red/);
146146

147147
});
148148

0 commit comments

Comments
 (0)