<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  <title>jsDigest</title>
  <link rel="stylesheet" type="text/css" href="test.css" />
</head>

<body>
  <ul id="results"></ul>

<script type="text/javascript" src="test.js"></script>
<script type="text/javascript" src="../lib/digest.js"></script>
<script type="text/javascript">

var timer = new Date().getTime();

log('== Digest ==');
test(true, !!this.Digest, 'Digest is defined');
test('string', Digest.Version, 'Digest.Version');
space();

space();
timed(new Date().getTime() - timer);
</script>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  <title>jsDigest</title>
  <link rel="stylesheet" type="text/css" href="test.css" />
</head>

<body>
  <ul id="results"></ul>

<script type="text/javascript" src="test.js"></script>
<script type="text/javascript" src="../lib/digest.js"></script>
<script type="text/javascript">

var timer = new Date().getTime();

(function () {
  log('== Digest ==');
  
  test(true, !!this.Digest, 'Digest is defined');
  test('string', Digest.Version, 'Digest.Version');
  
  space();
  
  document.title = 'jsDigest ' + Digest.Version;
}());

log('== Timer ==');
timed(new Date().getTime() - timer);
</script>

</body>
</html>

Use closures to group tests.
Use closures to group tests.
