/*eslint eqeqeq:0*/
require('es6-promise').polyfill()
const assert = require('assert')
const AssertionError = assert.AssertionError

module.exports = ok
ok.ok = ok

// promise equivalent of `assert.ok()`
// @param {String?} msg
// @return {Function}
function ok (msg) {
  // @param {Any} val
  // @return {Promise}
  return function (val) {
    if (val) return Promise.resolve()
    var err = new AssertionError(msg)
    err.message = msg
    return Promise.reject(err)
  }
}

// promise equivalent of `assert.equal()`
// @param {Any} orig
// @param {String?} msg
// @return {Function}
ok.equal = function equal (orig, msg) {
  // @param {Any} val
  // @return {Promise}
  return function (val) {
    if (orig == val) return Promise.resolve()
    var err = new AssertionError(msg)
    err.message = msg
    return Promise.reject(err)
  }
}

@@ -13,16 +13,35 @@
 qeq:0*/%0A
+const ES6Promise = 
 require(
@@ -59,18 +59,15 @@
 e').
-polyfill()
+Promise
 %0Acon
@@ -362,32 +362,35 @@
 if (val) return 
+ES6
 Promise.resolve(
@@ -454,32 +454,35 @@
  msg%0A    return 
+ES6
 Promise.reject(e
@@ -732,32 +732,35 @@
  == val) return 
+ES6
 Promise.resolve(
@@ -813,32 +813,32 @@
 r.message = msg%0A
-
     return Promi
@@ -832,16 +832,19 @@
  return 
+ES6
 Promise.

remove global polyfill