0

Digg

FireUnit: FireBug的JS单元测试扩展

Fireunit-ui-thumb

Post by yzhang at about 12 days

FireUnit是一个FireBug扩展,它让你可以像下面这样进行Javascript的单元测试,并通过FireBug得到一个图形化的运行结果。

   1  // Simple true-like/false-like testing
   2  fireunit.ok( true, "I'm going to pass!" );
   3  fireunit.ok( false, "I'm going to fail!" );
   4  
   5  // Compare two strings - shows a diff of the
   6  // results if they're different
   7  fireunit.compare(
   8    "The lazy fox jumped over the log.",
   9    "The lazy brown fox jumped the log.",
  10    "Are these two strings the same?"
  11  );
  12  
  13  // Compare a string using a regular expression
  14  fireunit.reCompare(
  15    /The .* fox jumped the log./,
  16    "The lazy brown fox jumped the log.",
  17    "Compare a string using a RegExp."
  18  );
  19  
  20  // Display the total results
  21  fireunit.testDone();

单元测试firebug

2

Digg

扩展Firebug指南

Header

Post by as0001 at about 1 months

前面有一篇文章我们讲到了5个最佳Firebug扩展,但是如果它们都不能满足你的需求该怎么办?答案就是自己做一个,Jan Odvarko的这篇扩展Firebug指南向你详细演示了如何创建一个新的Firebug扩展,指南共有6个部分。

firebugtutorials指南

1

Digg

五佳Firebug扩展

Post by as0001 at about 1 months

Firebug已经很好很强大了,那还能不能再强大一些呢?答案是肯定的,WebMonkey的Adam DuVander最近编辑了一份五佳Firebug扩展名单,它们可以让你的Firebug变得更加所向披靡,无往不利,YSlow当仁不让的坐上了头把交椅,排名第二到第五的分别是:Firecookie,FirePHP,Pixel perfect以及Rainbow。

firebug

Advertiserment

© Riggit, 2007