Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
ask-assertions
Advanced tools
ASK Assertions contains a number of helpers for testing common skill responses in projects built with the amazing Alexa Skills Kit SDK for Node.js.
Although, this package is based on the helpers from the Single Stream Audio Skill, it is in no way affiliated with or endorsed by Amazon or the Alexa team.
Install ask-assertions
as a devDependency:
$ npm i -D ask-assertions
Note:
ask-assertions
requires the following peerDependencies
ask-sdk-models
>= 1.11.xchai
>= 4.2.x
Example using mocha + chai with TypeScript.
import "mocha";
import * as assertions from "ask-assertions";
import { ResponseEnvelope } from "ask-sdk-model";
import { handler as skill } from "../src/index";
let skillResponse: ResponseEnvelope;
describe("AMAZON.HelpIntent", function testHelpIntent() {
before(() => {
this.timeout(5000);
return new Promise(resolve => {
skill(helpIntentRequest, null, (_, responseEnvelope) => {
skillResponse = responseEnvelope;
resolve();
});
});
});
it("should return a valid skill response", () => {
assertions.checkResponseStructure(skillResponse);
});
it("should return valid output speeach", () => {
assertions.checkOutputSpeech(skillResponse);
});
it("should say 'This skill can do cool things'", () => {
assertions.checkOutputSpeechContains(skillResponse, "This skill can do cool things");
});
});
These helpers were adapated to my workflow and common use-cases. If you have ideas on how to improve or expand them, please start a discussion via Github issues. Cheers.
FAQs
A set of helpers to test ask projects.
We found that ask-assertions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.