first commit
This commit is contained in:
commit
c069b8945d
34 files changed
+2424
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:cesiumjs/cesiumjs.dart';
|
||||
|
||||
void main() {
|
||||
test('CesiumMessage parses JSON messages', () {
|
||||
final m = CesiumMessage.parse('{"type":"ready","webgl":2}');
|
||||
expect(m.type, 'ready');
|
||||
expect(m.data['webgl'], 2);
|
||||
});
|
||||
|
||||
test('CesiumMessage falls back to raw for non-JSON', () {
|
||||
final m = CesiumMessage.parse('hello');
|
||||
expect(m.type, 'raw');
|
||||
expect(m.data['value'], 'hello');
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user