How to use the mwp-tracking-plugin/lib/util/avro.loggers function in mwp-tracking-plugin

To help you get started, we’ve selected a few mwp-tracking-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github meetup / meetup-web-platform / tests / integration / server.int.js View on Github external
return start({}, { routes }, mockConfig).then(server => {
			const avro = require('mwp-tracking-plugin/lib/util/avro');
			avro.loggers.click.mockReturnValue('mocked clicktracking log');
			const request = {
				method: 'get',
				url: '/ny-tech',
				credentials: 'whatever',
				headers: { cookie },
			};
			return server
				.inject(request)
				.then(response => {
					const cookieUnsetString = 'click-track=;';
					expect(avro.loggers.click).toHaveBeenCalledTimes(
						clickData.history.length
					);
					expect(response.headers['set-cookie']).toContainEqual(
						expect.stringContaining(cookieUnsetString)
					);
github meetup / meetup-web-platform / tests / integration / server.int.js View on Github external
.then(response => {
					const cookieUnsetString = 'click-track=;';
					expect(avro.loggers.click).toHaveBeenCalledTimes(
						clickData.history.length
					);
					expect(response.headers['set-cookie']).toContainEqual(
						expect.stringContaining(cookieUnsetString)
					);
				})
				.then(() => server.stop())

mwp-tracking-plugin

Data collection for MWP apps, including activity and click tracking

MIT
Latest version published 2 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages