function assertGlobalVariable(
						code,
						languageOptions,
						data = {},
					) {
						let spy;

						const config = {
							plugins: {
								test: {
									rules: {
										checker: {
											create(context) {
												spy = sinon.spy(node => {
													const scope =
														context.sourceCode.getScope(
															node,
														);
													const g = getVariable(
														scope,
														data.name,
													);

													assert.strictEqual(
														g.name,
														data.name,
													);
													assert.strictEqual(
														g.writeable,
														data.writeable,
													);
												});

												return { Program: spy };
											},
										},
									},
								},
							},
							rules: { "test/checker": "error" },
						};

						if (languageOptions !== void 0) {
							config.languageOptions = languageOptions;
						}

						linter.verify(code, config);
						assert(spy && spy.calledOnce);
					}
Asserts the global variables in the provided code using the specified language options and data.
@param {string} code The code to verify.
@param {Object} languageOptions The language options to use.
@param {Object} [data={}] Additional data for the assertion.
@returns {void}