How to use the @ts-common/azure-js-dev-tools.assertEx.throwsAsync function in @ts-common/azure-js-dev-tools

To help you get started, we’ve selected a few @ts-common/azure-js-dev-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / autorest.typescript / test / azure / parameterGrouping.ts View on Github external
it('should reject null required parameters', async function () {
      const error = await assertEx.throwsAsync(testClient.parameterGrouping.postRequired(null));
      assert(error);
      assert.strictEqual(error.message, "parameterGroupingPostRequiredParameters.path cannot be null or undefined.");
    });