Skip to content

Commit 92d8078

Browse files
committed
better example
1 parent 6277871 commit 92d8078

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/reference/v8.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@
139139
"type": [
140140
"step",
141141
["zoom"],
142-
"globe", 10, "mercator"
142+
"globe",
143+
10, "globe",
144+
12, "mercator"
143145
]
144146
}
145147
}

src/validate/validate_projection.test.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,10 @@ describe('Validate projection', () => {
3636
expect(errors).toHaveLength(0);
3737
});
3838
test('Should pass if everything is according to spec', () => {
39-
let errors = validateProjection({validateSpec, value: {type: ['step', ['zoom'], 'globe', 10, 'mercator']}, styleSpec: v8, style: {} as any});
39+
let errors = validateProjection({validateSpec, value: {type: ['step', ['zoom'], 'globe', 10, 'globe', 12, 'mercator']}, styleSpec: v8, style: {} as any});
4040
expect(errors).toHaveLength(0);
4141
errors = validateProjection({validateSpec, value: {type: 'mercator'}, styleSpec: v8, style: {} as any});
4242
expect(errors).toHaveLength(0);
4343
});
4444

45-
test('Can use different orders', () => {
46-
let errors = validateProjection({validateSpec, value: {type: ['step', ['zoom'], 'mercator', 10, 'globe']}, styleSpec: v8, style: {} as any});
47-
expect(errors).toHaveLength(0);
48-
errors = validateProjection({validateSpec, value: {type: 'mercator'}, styleSpec: v8, style: {} as any});
49-
expect(errors).toHaveLength(0);
50-
});
51-
test('Can only use expression compatible projections', () => {
52-
let errors = validateProjection({validateSpec, value: {type: ['step', ['zoom'], 'utm32', 10, 'globe']}, styleSpec: v8, style: {} as any});
53-
expect(errors).toHaveLength(0);
54-
errors = validateProjection({validateSpec, value: {type: 'mercator'}, styleSpec: v8, style: {} as any});
55-
expect(errors).toHaveLength(0);
56-
});
5745
});

0 commit comments

Comments
 (0)