fregante/webext-detect

Add expect/assert methods

Open

#5 opened on Jun 27, 2021

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (2 forks)github user discovery
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (50 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

function backgroundStuff() {
	expectBackground();
	// -> Error: Expected background context, found content script

	chrome.alarms.set(…);
}

I'm not sure about the API because this would only accept one type at a time and no negatives, e.g. "expect not background"

Contributor guide