2018-08-06 11:46:23 -07:00
|
|
|
const fs = require('fs');
|
|
|
|
const assert = require('assert');
|
|
|
|
|
|
|
|
exports.assert_comments_exist = function() {
|
|
|
|
const bindings_file = require.resolve('wasm-bindgen-test');
|
|
|
|
const contents = fs.readFileSync(bindings_file);
|
2020-04-13 20:51:32 +02:00
|
|
|
assert.ok(contents.includes("* annotated function ✔️ \" \\ ' {"));
|
2018-08-06 11:46:23 -07:00
|
|
|
assert.ok(contents.includes("* annotated struct type"));
|
2020-04-13 20:51:32 +02:00
|
|
|
assert.ok(contents.includes("* annotated struct field b"));
|
|
|
|
assert.ok(contents.includes("* annotated struct field c"));
|
|
|
|
assert.ok(contents.includes("* annotated struct constructor"));
|
2018-08-06 11:46:23 -07:00
|
|
|
assert.ok(contents.includes("* annotated struct method"));
|
2020-04-13 20:51:32 +02:00
|
|
|
assert.ok(contents.includes("* annotated struct getter"));
|
|
|
|
assert.ok(contents.includes("* annotated struct setter"));
|
|
|
|
assert.ok(contents.includes("* annotated struct static method"));
|
|
|
|
assert.ok(contents.includes("* annotated enum type"));
|
|
|
|
assert.ok(contents.includes("* annotated enum variant 1"));
|
|
|
|
assert.ok(contents.includes("* annotated enum variant 2"));
|
2018-08-06 11:46:23 -07:00
|
|
|
};
|