bitovi / funcunit

A functional test suite based on jQuery
https://funcunit.com/
MIT License
569 stars 379 forks source link

invalid usage of delete operator #246

Open koalixCZ opened 5 years ago

koalixCZ commented 5 years ago

There is usage of the delete operator in the method add (browser/queue.js). This construction is not valid in the strict mode so it leads to fail when FuncUnit is imported as a ES6 module.

add = function(handler, error, context) {
  if(handler instanceof Function) {
    if(typeof error === 'object') {
      context = error;
      delete error;
    }

    error = (error && error.toString()) || 'Custom method has failed.';

Found in the npm version 3.7.0

matthewp commented 5 years ago

Probably should set it to null instead