mirror of
https://github.com/adobe/brackets.git
synced 2024-11-20 09:53:00 +01:00
JsTestDriver scripts. Basic CodeMirror init test.
This commit is contained in:
parent
a454a7bce0
commit
6bbdfc81a0
Binary file not shown.
18
test/core/BracketsTest.js
Normal file
18
test/core/BracketsTest.js
Normal file
@ -0,0 +1,18 @@
|
||||
BracketsTest = TestCase("BracketsTest");
|
||||
|
||||
BracketsTest.prototype.testCodeMirrorInit = function() {
|
||||
// add #editor to document
|
||||
/*:DOC += <div id="editor"/> */
|
||||
|
||||
// init CodeMirror instance
|
||||
var content = 'Brackets is going to be awesome!"\n';
|
||||
var myCodeMirror = CodeMirror($('#editor').get(0), {
|
||||
value: content
|
||||
});
|
||||
|
||||
// verify editor content
|
||||
assertEquals(content, myCodeMirror.getValue());
|
||||
|
||||
// print to console
|
||||
jstestdriver.console.log("CodeMirror.getValue() = ", myCodeMirror.getValue());
|
||||
};
|
6
test/core/DemoTest.js
Normal file
6
test/core/DemoTest.js
Normal file
@ -0,0 +1,6 @@
|
||||
DemoTest = TestCase("DemoTest");
|
||||
|
||||
DemoTest.prototype.testFail = function() {
|
||||
// sanity check
|
||||
fail("fail");
|
||||
};
|
@ -1,5 +1,10 @@
|
||||
server: http://localhost:9876
|
||||
|
||||
load:
|
||||
- src/*.js
|
||||
- src-test/*.js
|
||||
- ../src/thirdparty/CodeMirror2/lib/*.js
|
||||
- ../src/thirdparty/CodeMirror2/lib/util/*.js
|
||||
- ../src/thirdparty/CodeMirror2/mode/javascript/javascript.js
|
||||
- ../src/thirdparty/*.js
|
||||
|
||||
test:
|
||||
- core/*.js
|
||||
|
19
test/server.sh
Executable file
19
test/server.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
while getopts "j:p:" flag
|
||||
do
|
||||
if [ $flag == "j" ]; then
|
||||
JSTD=$OPTARG
|
||||
elif [ $flag == "p" ]; then
|
||||
PORT=$OPTARG
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$PORT" ]; then
|
||||
PORT=9876
|
||||
fi
|
||||
|
||||
if [ -z "$JSTD" ]; then
|
||||
JSTD=`ls JsTestDriver.jar`
|
||||
fi
|
||||
|
||||
java -jar $JSTD --port $PORT --config jsTestDriver.conf
|
22
test/test.sh
Executable file
22
test/test.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
while getopts "j:t:" flag
|
||||
do
|
||||
if [ $flag == "j" ]; then
|
||||
JSTD=$OPTARG
|
||||
elif [ $flag == "t" ]; then
|
||||
TESTS=$OPTARG
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$JSTD" ]; then
|
||||
JSTD=`ls JsTestDriver.jar`
|
||||
fi
|
||||
|
||||
if [ -z "$TESTS" ]; then
|
||||
TESTS="all"
|
||||
echo "Running all tests"
|
||||
else
|
||||
echo "Running '$TESTS'"
|
||||
fi
|
||||
|
||||
java -jar $JSTD --tests "$TESTS" --config jsTestDriver.conf --reset
|
Loading…
Reference in New Issue
Block a user