import {getInfoFromString} from "./../../../main";
import {runFileDefinitionTests} from "./../../testHelpers";

describe("decorator arguments tests", () => {
    const code = `
function MyClassDecorator(target: Function) {
}

@MyClassDecorator
class MyClass1 {
}
`;

    const def = getInfoFromString(code);

    runFileDefinitionTests(def, {
        functions: [{
            name: "MyClassDecorator",
            parameters: [{
                name: "target",
                type: {
                    text: "Function"
                }
            }]
        }],
        classes: [{
            name: "MyClass1",
            decorators: [{
                name: "MyClassDecorator"
            }]
        }]
    });
});

Add test for decorator without args.
Add test for decorator without args.

Not sure why this wasn't here before.
