Removed shims from PhantomJS tests.
This commit is contained in:
parent
a9bc2b5ea8
commit
4df288e244
@ -11,6 +11,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="mocha"></div>
|
<div id="mocha"></div>
|
||||||
<script src="../node_modules/mocha/mocha.js"></script>
|
<script src="../node_modules/mocha/mocha.js"></script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Shim for PhantomJS: Promise
|
Shim for PhantomJS: Promise
|
||||||
See: https://github.com/stefanpenner/es6-promise
|
See: https://github.com/stefanpenner/es6-promise
|
||||||
@ -19,19 +20,9 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Shim for PhantomJS:
|
Shim for PhantomJS:
|
||||||
- Type Array prototype.slice
|
|
||||||
- ArrayBuffer.isView
|
- ArrayBuffer.isView
|
||||||
- Number.MAX_SAFE_INTEGER
|
|
||||||
- Math.log10
|
|
||||||
-->
|
-->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
if (!Uint8Array.prototype.slice) {
|
|
||||||
Uint8Array.prototype.slice = function() {
|
|
||||||
var args = Array.prototype.slice.call(arguments);
|
|
||||||
return new Uint8Array(Array.prototype.slice.apply(this, args));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ArrayBuffer.isView) {
|
if (!ArrayBuffer.isView) {
|
||||||
ArrayBuffer.isView = function(obj) {
|
ArrayBuffer.isView = function(obj) {
|
||||||
// @TODO: This should probably check various instanceof aswell
|
// @TODO: This should probably check various instanceof aswell
|
||||||
@ -39,16 +30,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Number.MAX_SAFE_INTEGER) {
|
|
||||||
Number.MAX_SAFE_INTEGER = 0x1fffffffffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Math.log10) {
|
|
||||||
Math.log10 = Math.log10 || function(x) {
|
|
||||||
return Math.log(x) / Math.LN10;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://github.com/nathanboktae/mocha-phantomjs-core#usage
|
// https://github.com/nathanboktae/mocha-phantomjs-core#usage
|
||||||
if (typeof(initMochaPhantomJS) === 'function') {
|
if (typeof(initMochaPhantomJS) === 'function') {
|
||||||
initMochaPhantomJS();
|
initMochaPhantomJS();
|
||||||
@ -63,6 +44,7 @@
|
|||||||
|
|
||||||
<!-- Run the test cases! -->
|
<!-- Run the test cases! -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
//mocha.grep(new RegExp('...')).run();
|
||||||
mocha.run();
|
mocha.run();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user