<commit_before>var ProjectCatalog = artifacts.require("ProjectCatalog");

const BigNumber = web3.BigNumber

const should = require('chai')
	.use(require('chai-as-promised'))
	.use(require('chai-bignumber')(BigNumber))
	.should()

contract('ProjectCatalog', function(accounts) {
	var owner = accounts[0];
	var projectCatalog;

	before("deploy Privileged contract", async function() {
		projectCatalog = await ProjectCatalog.new();
	});

	it("should correctly set initial owner", async function() {
		// (await ownableWithRecovery.owner()).should.be.equal(initialOwner);
		//
		// (await ownableWithRecovery.recoveryVote(recovery1)).should.be.equal(initialOwner);
		// (await ownableWithRecovery.recoveryVote(recovery2)).should.be.equal(initialOwner);
		// (await ownableWithRecovery.recoveryVote(recovery3)).should.be.equal(initialOwner);
		//
		// (await ownableWithRecovery.voteCount(initialOwner)).should.be.bignumber.equal(3);
	});

});<commit_msg>Project Catalog tests<commit_after>var ProjectCatalog = artifacts.require("ProjectCatalog");
var Project = artifacts.require("Project");

const BigNumber = web3.BigNumber

const should = require('chai')
	.use(require('chai-as-promised'))
	.use(require('chai-bignumber')(BigNumber))
	.should()

contract('ProjectCatalog', function(accounts) {
	var owner = accounts[0];
	var project;
	var projectCatalog;

	before("deploy Privileged contract", async function() {
		projectCatalog = await ProjectCatalog.new();
	});

	it("should add a project to catalog", async function() {
		project = await Project.deployed();
		await projectCatalog.addProject("PROJECT", project.address);

		(await projectCatalog.getProjectAddress("PROJECT")).should.be.equal(project.address);
	});

	it("should prevent adding the same project again", async function() {
		await projectCatalog.addProject("PROJECT", project.address).should.be.rejectedWith('invalid opcode');
	});

});
{'fraction_non_alphanumeric': 0.15133998949027852, 'fraction_numerical': 0.004203888596952181, 'mean_word_length': 6.131086142322097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '80403', 'n_tokens_mistral': 594, 'n_tokens_neox': 591, 'n_words': 107}