build-in-public-bot
Version:
AI-powered CLI bot for automating build-in-public tweets with code screenshots
37 lines • 1.1 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const dotenv_1 = __importDefault(require("dotenv"));
dotenv_1.default.config({ path: '.env.test' });
process.env.NODE_ENV = 'test';
global.console = {
...console,
log: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
};
expect.extend({
toBeValidTweet(received) {
const pass = received.length <= 280 && received.length > 0;
if (pass) {
return {
message: () => `expected ${received} not to be a valid tweet`,
pass: true,
};
}
else {
return {
message: () => `expected ${received} to be a valid tweet (1-280 characters), but it has ${received.length} characters`,
pass: false,
};
}
},
});
afterEach(() => {
jest.clearAllMocks();
});
//# sourceMappingURL=setup.js.map
;