Package Exports
- @drownek/paper-e2e-runner
- @drownek/paper-e2e-runner/dist/runner.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@drownek/paper-e2e-runner) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@drownek/paper-e2e-runner
End-to-end testing runner for Paper/Spigot Minecraft plugins.
Installation
npm install @drownek/paper-e2e-runnerQuick Start
import { test, expect } from '@drownek/paper-e2e-runner';
test('player can join server', async ({ player }) => {
player.chat('/help');
await expect(player).toHaveReceivedMessage('Available commands');
});
test('player can interact with GUI', async ({ player }) => {
await player.makeOp();
player.chat('/staffactivity view');
// Get a live handle to the GUI
const gui = await player.gui({ title: /Staff activity/ });
// Create a locator for items
const messageItem = gui.locator(i => i.hasLore('messages'));
// Expectations automatically retry
await expect(messageItem).toHaveLore('messages');
});Documentation
Full documentation is available in the GitHub repository Wiki.
License
MIT