vkarpov15 / acquit Goto Github PK
View Code? Open in Web Editor NEWParse BDD-style tests (Mocha, Jasmine) to generate documentation
License: Apache License 2.0
Parse BDD-style tests (Mocha, Jasmine) to generate documentation
License: Apache License 2.0
async function()
should work, but haven't tried. co.wrap()
definitely does not work.
With Mocha, you can choose to skip tests, or only run particular tests using .skip()
and .only()
. I'm not sure how often the latter might occur in users tests... however the former (skip
) is likely to be used for any number of reasons.
describe("Test Swagger examples for XYZ", () => {
context("/uri", () => {
it.only("Returns 200, when sending a valid request", async () => {
// Test Code
});
// Skipping due to BUG-123
it.skip("Returns 400, when sending invalid data", async () => {
// Test Code
});
it("Returns 401, when missing required auth headers", async () => {
// Test Code
});
it("Returns 403, when sending invalid auth headers", async () => {
// Test Code
});
});
}
Hello,
first of all - thanks for the nice tool, which "acquit" is.
Let me notice that there exist some BDD extensions allowing to declare additional behavior of the tests - eg. "given" or "when" ( jasmine-rowtests or jasmine-given ). Currently acquit completely ignores such clauses eg.:
> var acquit = require('acquit');
> var parser = acquit();
> parser.parse('describe("test", function() { given("xx").it("bla", function() {} )}); ');
Though it nicely supports:
> parser.parse('describe("test", function() { for(i=1; i<10; i++) { it("bla", function() {} ); } }); ');
Would you like to add to acquit support for such cases ?
Kind regards,
Hello!
I am trying to parse functions with acquit, but I have an unexpected token error on spread operator.
The code near error look like this
settings.ui = { ...settings.ui, useBrowserTimezone: true };
How can I fix such error?
(Please) Make Acquit support ES6. I'm unable to parse any of my tests, due to Error: Line 1: Unexpected token import
. I'm using ES6 syntax, with import
instead of require
.
(Opening as a separate issue, from #22 , for ease of tracking)
The latest version fails when trying to parse tests (it
blocks) which use the JS "spread" operator/syntax
const obj = {
name: "My Object"
};
it("should parse spread syntax", async () => {
const newObj = { key: { ...obj, newKey: "newValue" } };
// TEST CODE
});
Error: Line 165: Unexpected token ...
If I comment out the lines which contain "...", then it'll parse the full test file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.