Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.4.19;
import 'zeppelin-solidity/contracts/token/ERC20/MintableToken.sol';
contract BITTokenTest is MintableToken {
string public name = "BITTokenTest";
string public symbol = "BIT";
uint8 public decimals = 18;
}
/* eslint-disable class-methods-use-this */
type UserProfile = {
name: string;
avatarUrl: string;
balance: number;
};
abstract class AbstractWallet {
// Returns a promise that resolves an array of strings, each string is an origin
async getOrdinals(): Promise<string[]> {
import { GraphQLRelayService } from './GraphQLRelayService';
import superagent, { Response } from 'superagent';
import { jest } from '@jest/globals';
jest.mock('superagent');
interface TokenResponse {
body: {
access_token: string;
expires_in: number;
https://www.youtube.com/playlist?list=PLj6h78yzYM2O3YsKnBocZZPv0M6f-wLu5
import {
CatalogProcessor,
CatalogProcessorEmit,
CatalogProcessorParser,
processingResult,
} from '@backstage/plugin-catalog-backend';
import {
Entity,
parseEntityRef,
} from '@backstage/catalog-model';
// package.json
{
"name": "use-entity-client-access-check",
"version": "1.0.0",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"test": "jest"
},
"dependencies": {
/**
* Copyright ...
* (License header)
*/
export const defaultPreviewTemplate = `# Edit the template parameters below to see how they will render in the scaffolder form UI
parameters:
- title: Fill in some steps
ui:ObjectFieldTemplate: TwoColumn
required:
import React from 'react';
import {
TemplateCard,
type TemplateCardProps,
} from '@backstage/plugin-scaffolder-react';
import { Typography, makeStyles } from '@material-ui/core';
const useStyles = makeStyles(theme => ({
annotation: {
marginTop: theme.spacing(1),
I'll update both test files to follow modern React Testing Library best practices and linting rules. Here's the improved version of both tests:
```xml
<code_changes>
<changed_files>
<file>
<file_summary>Update CardHeader test to follow RTL best practices</file_summary>
<file_operation>UPDATE</file_operation>
<file_path>/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.test.tsx</file_path>
<file_code><![CDATA[