Skip to content

Commit 1052471

Browse files
committed
tests: added coverage config to package-level
1 parent a8b5578 commit 1052471

File tree

4 files changed

+66
-10
lines changed

4 files changed

+66
-10
lines changed

.coverage.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"include": [
3+
"**/packages/simple-schema/**/*",
4+
"**/packages/*aldeed_simple_schema.js"
5+
]
6+
}

lib/SimpleSchema_autoValueFunctions.tests.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,6 @@ describe('SimpleSchema - autoValueFunctions', function () {
152152
expect(autoValueFunctions[1].fieldName).to.equal('a.b.$.z');
153153
expect(autoValueFunctions[1].closestSubschemaFieldName).to.equal('a.b.$');
154154
});
155+
156+
it('async functions');
155157
});

lib/clean/autoValue.tests.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ describe('autoValue', function () {
440440
});
441441
});
442442

443+
it('async content');
444+
443445
it('array of objects autoValues', function () {
444446
const schema = new SimpleSchema({
445447
avArrayOfObjects: {
@@ -500,6 +502,8 @@ describe('autoValue', function () {
500502
});
501503
});
502504

505+
it('async array of objects autoValues');
506+
503507
it('$each in autoValue pseudo modifier', function () {
504508
const schema = new SimpleSchema({
505509
psuedoEach: {
@@ -535,6 +539,8 @@ describe('autoValue', function () {
535539
});
536540
});
537541

542+
it('async $each in autoValue pseudo modifier');
543+
538544
it('simple autoValues', function () {
539545
const schema = new SimpleSchema({
540546
name: {
@@ -602,6 +608,8 @@ describe('autoValue', function () {
602608
});
603609
});
604610

611+
it('async simple autoValues');
612+
605613
it('objects in arrays', function () {
606614
const subSchema = new SimpleSchema({
607615
value: {

package.js

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,70 @@
22
Package.describe({
33
name: 'aldeed:simple-schema',
44
summary: 'A simple schema validation object with reactivity. Used by collection2 and autoform.',
5-
version: '2.0.0',
5+
version: '1.13.1',
66
git: 'https://github.com/aldeed/meteor-simple-schema.git'
77
});
88

99
Npm.depends({
1010
'mongo-object': '3.0.1',
1111
'message-box': '0.2.7',
1212
'clone': '2.1.2'
13-
})
13+
});
1414

1515
Package.onUse(function (api) {
16-
api.versionsFrom(['1.3', '2.3', '3.0-alpha.19'])
17-
api.use('ecmascript')
18-
api.mainModule('lib/main.js')
16+
api.versionsFrom(['1.3', '2.3', '3.0-alpha.19']);
17+
api.use('ecmascript');
18+
api.mainModule('lib/main.js');
1919
});
2020

2121
Package.onTest(function (api) {
22+
api.use([
23+
'lmieulet:meteor-legacy-coverage',
24+
'lmieulet:[email protected]',
25+
'meteortesting:[email protected]',
26+
'meteortesting:browser-tests',
27+
])
28+
29+
api.versionsFrom(['2.3', '2.8.1'])
30+
2231
api.use([
2332
'ecmascript',
2433
'tracker',
25-
'meteortesting:[email protected]',
26-
'meteortesting:[email protected]',
2734
'mongo',
2835
'aldeed:simple-schema'
29-
])
30-
api.mainModule('lib/main.tests.js')
31-
})
36+
]);
37+
38+
api.addFiles([
39+
'lib/clean/autoValue.tests.js',
40+
'lib/clean/convertToProperType.tests.js',
41+
'lib/clean/defaultValue.tests.js',
42+
'lib/clean/setAutoValues.tests.js',
43+
'lib/utility/getLastPartOfKey.tests.js',
44+
'lib/clean.tests.js',
45+
'lib/expandShorthand.tests.js',
46+
'lib/humanize.tests.js',
47+
'lib/SimpleSchema.tests.js',
48+
'lib/SimpleSchema_allowedValues.tests.js',
49+
'lib/SimpleSchema_autoValueFunctions.tests.js',
50+
'lib/SimpleSchema_blackbox.tests.js',
51+
'lib/SimpleSchema_custom.tests.js',
52+
'lib/SimpleSchema_definition.tests.js',
53+
'lib/SimpleSchema_extend.tests.js',
54+
'lib/SimpleSchema_getObjectSchema.tests.js',
55+
'lib/SimpleSchema_getQuickTypeForKey.tests.js',
56+
'lib/SimpleSchema_labels.tests.js',
57+
'lib/SimpleSchema_max.tests.js',
58+
'lib/SimpleSchema_messages.tests.js',
59+
'lib/SimpleSchema_min.tests.js',
60+
'lib/SimpleSchema_minCount.tests.js',
61+
'lib/SimpleSchema_namedContext.tests.js',
62+
'lib/SimpleSchema_omit.tests.js',
63+
'lib/SimpleSchema_oneOf.tests.js',
64+
'lib/SimpleSchema_pick.tests.js',
65+
'lib/SimpleSchema_regEx.tests.js',
66+
'lib/SimpleSchema_required.tests.js',
67+
'lib/SimpleSchema_rules.tests.js',
68+
'lib/SimpleSchema_type.tests.js',
69+
'lib/reactivity.tests.js'
70+
]);
71+
});

0 commit comments

Comments
 (0)