-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demos: Replace /test/dropdown-many.html with q4000 benchmark and demo
- Loading branch information
Showing
13 changed files
with
29,601 additions
and
1,551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const q3000 = require('../test/benchmark/q4000.json'); | ||
|
||
{ | ||
const file = 'demos/q4000-qunit.js'; | ||
|
||
// Deal with indentation etc later via eslint --fix (or `npm run lint-fix`). | ||
const formatTest = (name) => `QUnit.test(${JSON.stringify(name)}, function (assert) { | ||
assert.true(true); | ||
assert.true(true); | ||
});`; | ||
const formatMembers = (members) => { | ||
return members.map(member => { | ||
if (typeof member === 'string') { | ||
return formatTest(member); | ||
} else { | ||
const tests = formatMembers(member.members); | ||
return `QUnit.module(${JSON.stringify(member.name)}, function () { | ||
${tests} | ||
});`; | ||
} | ||
}).join('\n\n'); | ||
}; | ||
fs.writeFileSync(path.join(__dirname, '..', file), formatMembers(q3000)); | ||
console.log('Written to ' + file); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>q4000 on QUnit</title> | ||
<link rel="stylesheet" href="../src/qunit.css"> | ||
</head> | ||
<body> | ||
<div id="qunit"></div> | ||
<script src="../qunit/qunit.js"></script> | ||
<script src="q4000-qunit.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.