15832144755
2022-01-06 7b4c8991dca9cf2a809a95e239d144697d3afb56
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { hasExtension } from "../../Source/Cesium.js";
 
describe("Scene/hasExtension", function () {
  it("detects the presence of an extension", function () {
    var tile = {
      extensions: {
        "3DTILES_extension": {},
      },
    };
    expect(hasExtension(tile, "3DTILES_extension")).toEqual(true);
  });
 
  it("detects the absence of an extension", function () {
    var tile = {};
    expect(hasExtension(tile, "3DTILES_extension")).toEqual(false);
    tile = {
      extensions: {},
    };
    expect(hasExtension(tile, "3DTILES_extension")).toEqual(false);
    tile = {
      extensions: {
        "3DTILES_other_extension": {},
      },
    };
    expect(hasExtension(tile, "3DTILES_extension")).toEqual(false);
  });
});