|
16 | 16 | var Entity = require('../../datastore/concepts').Entity;
|
17 | 17 | var entity;
|
18 | 18 |
|
19 |
| -before(function() { |
20 |
| - var projectId = process.env.TEST_PROJECT_ID || 'nodejs-docs-samples'; |
21 |
| - entity = new Entity(projectId); |
22 |
| -}); |
| 19 | +describe('datastore/concepts/entity', function () { |
| 20 | + before(function() { |
| 21 | + var projectId = process.env.TEST_PROJECT_ID || 'nodejs-docs-samples'; |
| 22 | + entity = new Entity(projectId); |
| 23 | + }); |
23 | 24 |
|
24 |
| -describe('incomplete key', function() { |
25 |
| - it('saves with an incomplete key', function(done) { |
26 |
| - entity.testIncompleteKey(done); |
| 25 | + describe('incomplete key', function() { |
| 26 | + it('saves with an incomplete key', function(done) { |
| 27 | + entity.testIncompleteKey(done); |
| 28 | + }); |
27 | 29 | });
|
28 |
| -}); |
29 | 30 |
|
30 |
| -describe('testNamedKey', function() { |
31 |
| - it('saves with a named key', function(done) { |
32 |
| - entity.testNamedKey(done); |
| 31 | + describe('testNamedKey', function() { |
| 32 | + it('saves with a named key', function(done) { |
| 33 | + entity.testNamedKey(done); |
| 34 | + }); |
33 | 35 | });
|
34 |
| -}); |
35 | 36 |
|
36 |
| -describe('testKeyWithParent', function() { |
37 |
| - it('saves a key with a parent', function(done) { |
38 |
| - entity.testKeyWithParent(done); |
| 37 | + describe('testKeyWithParent', function() { |
| 38 | + it('saves a key with a parent', function(done) { |
| 39 | + entity.testKeyWithParent(done); |
| 40 | + }); |
39 | 41 | });
|
40 |
| -}); |
41 | 42 |
|
42 |
| -describe('testKeyWithMultiLevelParent', function() { |
43 |
| - it('saves a key with multiple parents', function(done) { |
44 |
| - entity.testKeyWithMultiLevelParent(done); |
| 43 | + describe('testKeyWithMultiLevelParent', function() { |
| 44 | + it('saves a key with multiple parents', function(done) { |
| 45 | + entity.testKeyWithMultiLevelParent(done); |
| 46 | + }); |
45 | 47 | });
|
46 |
| -}); |
47 | 48 |
|
48 |
| -describe('testEntityWithParent', function() { |
49 |
| - it('saves an entity with a parent', function(done) { |
50 |
| - entity.testEntityWithParent(done); |
| 49 | + describe('testEntityWithParent', function() { |
| 50 | + it('saves an entity with a parent', function(done) { |
| 51 | + entity.testEntityWithParent(done); |
| 52 | + }); |
51 | 53 | });
|
52 |
| -}); |
53 | 54 |
|
54 |
| -describe('testProperties', function() { |
55 |
| - it('saves an entity with properties', function(done) { |
56 |
| - entity.testProperties(done); |
| 55 | + describe('testProperties', function() { |
| 56 | + it('saves an entity with properties', function(done) { |
| 57 | + entity.testProperties(done); |
| 58 | + }); |
57 | 59 | });
|
58 |
| -}); |
59 | 60 |
|
60 |
| -describe('testArrayValue', function() { |
61 |
| - it('saves an entity with arrays', function(done) { |
62 |
| - entity.testArrayValue(done); |
| 61 | + describe('testArrayValue', function() { |
| 62 | + it('saves an entity with arrays', function(done) { |
| 63 | + entity.testArrayValue(done); |
| 64 | + }); |
63 | 65 | });
|
64 |
| -}); |
65 | 66 |
|
66 |
| -describe('testBasicEntity', function() { |
67 |
| - it('saves a basic entity', function(done) { |
68 |
| - entity.testBasicEntity(done); |
| 67 | + describe('testBasicEntity', function() { |
| 68 | + it('saves a basic entity', function(done) { |
| 69 | + entity.testBasicEntity(done); |
| 70 | + }); |
69 | 71 | });
|
70 |
| -}); |
71 | 72 |
|
72 |
| -describe('testUpsert', function() { |
73 |
| - it('saves with an upsert', function(done) { |
74 |
| - entity.testUpsert(done); |
| 73 | + describe('testUpsert', function() { |
| 74 | + it('saves with an upsert', function(done) { |
| 75 | + entity.testUpsert(done); |
| 76 | + }); |
75 | 77 | });
|
76 |
| -}); |
77 | 78 |
|
78 |
| -describe('testInsert', function() { |
79 |
| - it('saves with an insert', function(done) { |
80 |
| - entity.testInsert(done); |
| 79 | + describe('testInsert', function() { |
| 80 | + it('saves with an insert', function(done) { |
| 81 | + entity.testInsert(done); |
| 82 | + }); |
81 | 83 | });
|
82 |
| -}); |
83 | 84 |
|
84 |
| -describe('testLookup', function() { |
85 |
| - it('performs a lookup', function(done) { |
86 |
| - entity.testLookup(done); |
| 85 | + describe('testLookup', function() { |
| 86 | + it('performs a lookup', function(done) { |
| 87 | + entity.testLookup(done); |
| 88 | + }); |
87 | 89 | });
|
88 |
| -}); |
89 | 90 |
|
90 |
| -describe('testUpdate', function() { |
91 |
| - it('saves with an update', function(done) { |
92 |
| - entity.testUpdate(done); |
| 91 | + describe('testUpdate', function() { |
| 92 | + it('saves with an update', function(done) { |
| 93 | + entity.testUpdate(done); |
| 94 | + }); |
93 | 95 | });
|
94 |
| -}); |
95 | 96 |
|
96 |
| -describe('testDelete', function() { |
97 |
| - it('deletes an entity', function(done) { |
98 |
| - entity.testDelete(done); |
| 97 | + describe('testDelete', function() { |
| 98 | + it('deletes an entity', function(done) { |
| 99 | + entity.testDelete(done); |
| 100 | + }); |
99 | 101 | });
|
100 |
| -}); |
101 | 102 |
|
102 |
| -describe('testBatchUpsert', function() { |
103 |
| - it('performs a batch upsert', function(done) { |
104 |
| - entity.testBatchUpsert(done); |
| 103 | + describe('testBatchUpsert', function() { |
| 104 | + it('performs a batch upsert', function(done) { |
| 105 | + entity.testBatchUpsert(done); |
| 106 | + }); |
105 | 107 | });
|
106 |
| -}); |
107 | 108 |
|
108 |
| -describe('testBatchLookup', function() { |
109 |
| - it('performs a batch lookup', function(done) { |
110 |
| - entity.testBatchLookup(done); |
| 109 | + describe('testBatchLookup', function() { |
| 110 | + it('performs a batch lookup', function(done) { |
| 111 | + entity.testBatchLookup(done); |
| 112 | + }); |
111 | 113 | });
|
112 |
| -}); |
113 | 114 |
|
114 |
| -describe('testBatchDelete', function() { |
115 |
| - it('performs a batch delete', function(done) { |
116 |
| - entity.testBatchDelete(done); |
| 115 | + describe('testBatchDelete', function() { |
| 116 | + it('performs a batch delete', function(done) { |
| 117 | + entity.testBatchDelete(done); |
| 118 | + }); |
117 | 119 | });
|
118 | 120 | });
|
0 commit comments