manyfest 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,80 +0,0 @@
1
- /**
2
- * Unit tests for Meadow
3
- *
4
- * @license MIT
5
- *
6
- * @author Steven Velozo <steven@velozo.com>
7
- */
8
-
9
- var Chai = require("chai");
10
- var Expect = Chai.expect;
11
-
12
- let libManyfest = require('../source/Manyfest.js');
13
-
14
- let _SampleDataArchiveOrgFrankenberry = require('./Data-Archive-org-Frankenberry.json');
15
- let _SampleDataWeather = require('./Data-Yahoo-Weather.json');
16
-
17
- suite
18
- (
19
- 'Advanced Object Access',
20
- function()
21
- {
22
- setup (()=> {} );
23
-
24
- suite
25
- (
26
- 'Advanced Object Reading (with Arrays and Boxed Property addresses)',
27
- ()=>
28
- {
29
- test
30
- (
31
- 'Access specific array elements',
32
- (fTestComplete)=>
33
- {
34
- let _Manyfest = new libManyfest();
35
- let tmpDog = _Manyfest.getValueAtAddress({Dogs:['Fido','Spot','Trinity']}, 'Dogs[1]');
36
- Expect(tmpDog)
37
- .to.equal('Spot');
38
- fTestComplete();
39
- }
40
- );
41
- test
42
- (
43
- 'Access specific boxed properties',
44
- (fTestComplete)=>
45
- {
46
- let _Manyfest = new libManyfest();
47
- let tmpDog = _Manyfest.getValueAtAddress({Dogs:{RunnerUp:'Fido',Loser:'Spot',Winner:'Trinity'}}, 'Dogs["Winner"]');
48
- Expect(tmpDog)
49
- .to.equal('Trinity');
50
- fTestComplete();
51
- }
52
- );
53
- test
54
- (
55
- 'Attempt to access specific boxed properties that do not exist',
56
- (fTestComplete)=>
57
- {
58
- let _Manyfest = new libManyfest();
59
- let tmpDog = _Manyfest.getValueAtAddress({Dogs:{RunnerUp:'Fido',Loser:'Spot',Winner:'Trinity'}}, 'Dogs["Disqualified"]');
60
- Expect(tmpDog)
61
- .to.be.an('undefined');
62
- fTestComplete();
63
- }
64
- );
65
- test
66
- (
67
- 'Access nested box properties',
68
- (fTestComplete)=>
69
- {
70
- let _Manyfest = new libManyfest();
71
- let tmpDog = _Manyfest.getValueAtAddress({Dogs:{RunnerUp:{Name:'Fido',Speed:100},Loser:{Name:'Spot'},Winner:{Name:'Trinity'}}}, 'Dogs["RunnerUp"].Name');
72
- Expect(tmpDog)
73
- .to.equal('Fido');
74
- fTestComplete();
75
- }
76
- );
77
- }
78
- )
79
- }
80
- );