Esempio n. 1
0
	it("should render 'not available'", () => {
		autotest(testdataNotAvailable, `${__dirname}/testdata/DefPopup-notAvailable.json`,
			<DefPopup
				def={{Repo: "r", CommitID: "c", FmtStrings: fmtStrings}}
				examples={{test: "examples"}}
				highlightedDef={null} />,
				{features: {}},
		);
	});
Esempio n. 2
0
	it("should render definition data", () => {
		autotest(testdataData, `${__dirname}/testdata/DefPopup-data.json`,
			<DefPopup
				def={{Repo: "r", CommitID: "c", FmtStrings: fmtStrings, DocHTML: "someDoc"}}
				examples={{test: "examples"}}
				highlightedDef="otherURL" />,
				{features: {}},
		);
	});
	it("should render empty", () => {
		autotest(testdataEmpty, `${__dirname}/testdata/RefLocationsList-empty.json`,
			<RefLocationsList
				repo="r" rev="v" path="p"
				def={{Repo: "r", CommitID: "c"}}
				location={{}}
				refLocations={{}} />,
			ctx,
		);
	});
	it("should render definition data", () => {
		autotest(testdataData, `${__dirname}/testdata/RefLocationsList-data.json`,
			<RefLocationsList
				repo="r" rev="v" path="p"
				def={{Repo: "r", CommitID: "c"}}
				location={{}}
				refLocations={{RepoRefs: [{Repo: "r", Files: [{Path: "f", Count: 2}]}]}} />,
			{...ctx, signedIn: true, githubToken: {scope: "repo"}},
		);
	});
	it("should initially render empty and want build and tasks", () => {
		autotest(testdataInitial, `${__dirname}/testdata/BuildContainer-initial.json`,
			<BuildContainer	params={{splat: "r", id: "1"}} />,
			{user: null},
		);
	});
Esempio n. 6
0
	it("should render definition data", () => {
		autotest(testdataData, `${__dirname}/testdata/DefTooltip-data.json`,
			<DefTooltip def={{URL: "someURL", FmtStrings: fmtStrings, DocHTML: "someDoc", Repo: "someRepo"}} />
		);
	});
Esempio n. 7
0
	it("should render", () => {
		autotest(testdataInitial, `${__dirname}/testdata/DiffStatScale-initial.json`,
			<DiffStatScale Stat={sampleStats} />
		);
	});