summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/bluetooth/script-tests/server/service-not-found.js
blob: 0fd2dace7871f7edf00251d53532263901ffe86b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict';
const test_desc = 'Request for absent service. Reject with NotFoundError.';

bluetooth_test(() => getHealthThermometerDevice({
      filters: [{services: ['health_thermometer']}],
      optionalServices: ['glucose']
    })
    .then(({device}) => assert_promise_rejects_with_message(
        device.gatt.CALLS([
          getPrimaryService('glucose')|
          getPrimaryServices('glucose')[UUID]
        ]),
        new DOMException(
            `No Services matching UUID ${glucose.uuid} found in Device.`,
            'NotFoundError'))),
    test_desc);