bitovi/funcunit

invalid usage of delete operator

開放

#246 建立於 2019年5月29日

 (1 則留言) (0 個反應) (0 位負責人)JavaScript (395 個分叉)batch import
bughelp wantedp2

倉庫指標

星標
 (575 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南