1 | var convert = require('../lib')
|
2 | , assert = require('assert')
|
3 | , tests = {};
|
4 |
|
5 | tests['ppm to ppm'] = function () {
|
6 | assert.strictEqual( convert(1).from('ppm').to('ppm') , 1);
|
7 | };
|
8 |
|
9 | tests['ppb to ppb'] = function () {
|
10 | assert.strictEqual( convert(1).from('ppb').to('ppb') , 1);
|
11 | };
|
12 |
|
13 | tests['ppm to ppb'] = function () {
|
14 | assert.strictEqual( convert(1).from('ppm').to('ppb') , 1000);
|
15 | };
|
16 |
|
17 | tests['ppb to ppm'] = function () {
|
18 | assert.strictEqual( convert(1).from('ppb').to('ppm') , .001);
|
19 | };
|
20 |
|
21 | tests['ppt to ppt'] = function () {
|
22 | assert.strictEqual( convert(1).from('ppt').to('ppt'), 1);
|
23 | }
|
24 |
|
25 | tests['ppm to ppt'] = function () {
|
26 | assert.strictEqual( convert(1).from('ppm').to('ppt'), 1000000);
|
27 | }
|
28 |
|
29 | tests['ppt to ppb'] = function () {
|
30 | assert.strictEqual( convert(1).from('ppt').to('ppb'), .001);
|
31 | }
|
32 |
|
33 | tests['ppt to ppm'] = function () {
|
34 | assert.strictEqual( convert(1).from('ppt').to('ppm'), .000001);
|
35 | }
|
36 |
|
37 | tests['ppq to ppq'] = function () {
|
38 | assert.strictEqual( convert(1).from('ppq').to('ppq'), 1);
|
39 | }
|
40 |
|
41 | tests['ppq to ppt'] = function () {
|
42 | assert.strictEqual( convert(1).from('ppq').to('ppt'), .001);
|
43 | }
|
44 |
|
45 | tests['ppq to ppm'] = function () {
|
46 | assert.strictEqual( convert(1).from('ppq').to('ppm'), .000000001);
|
47 | }
|
48 |
|
49 | module.exports = tests;
|