summaryrefslogtreecommitdiff
path: root/tests/test_analyzer.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-10-21 10:55:01 +0300
committerAlon Levy <alon@pobox.com>2014-10-21 11:00:22 +0300
commitb8119bfb95550fdb9014df3a80791024a9923867 (patch)
treea3f40e05216e14af0f61f4d67d7f62828eb133d3 /tests/test_analyzer.js
parente91affbe18d1ac5cdbe202cc195b193505313338 (diff)
fix test_analyzer after require.js
Diffstat (limited to 'tests/test_analyzer.js')
-rw-r--r--tests/test_analyzer.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_analyzer.js b/tests/test_analyzer.js
index d003f8f6..bd74429b 100644
--- a/tests/test_analyzer.js
+++ b/tests/test_analyzer.js
@@ -18,15 +18,17 @@ I like to work with #a
base.run_tests({
done: function (errors, window) {
debugger;
- if (process.argv.length > 2) {
- window.analyzeSentence(process.argv.slice(2).join(" "), true);
- dump_graphviz(window);
+ var analyzeSentence = window.require('textanalysis.ui').analyzeSentence;
+ console.log(process.argv);
+ if (process.argv.length >= 2) {
+ analyzeSentence(process.argv.slice(2).join(" "), true);
+ base.dump_graphviz(window.require('rhizicore').force);
} else {
for (var k in data) {
var sentence = data[k][0];
var expected_nodes = data[k][1];
var expected_links = data[k][2];
- window.analyzeSentence(sentence, true);
+ analyzeSentence(sentence, true);
// TODO - compare graphs
}
}