Skip to content

Commit

Permalink
Add spec for morph.currentAnalyses()
Browse files Browse the repository at this point in the history
Not perfect, but other values in there are probably not stable enough
to test right now.
  • Loading branch information
LFDM committed Jun 15, 2014
1 parent 6be0fc5 commit 1c36484
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/arethusa.morph/morph_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,13 @@ describe("morph", function() {
expect(morph.styleOf(f1)).toEqual(nounStyle);
});
});

describe('this.currentAnalyses', function() {
it('returns an obj containing arrays of forms of currently selected (e.g. clicked) tokens and other things', function() {
var f1 = state.getToken('01').morphology;
state.selectToken('01', 'click');
var cA = morph.currentAnalyses();
expect(cA['01'].forms).toEqual([f1]);
});
});
});

0 comments on commit 1c36484

Please sign in to comment.