@ -15,8 +15,7 @@ if (!mockRpcEnabled) {
|
||||
jest.setTimeout(10000);
|
||||
}
|
||||
|
||||
|
||||
test('load noop program', async () => {
|
||||
test('load native program', async () => {
|
||||
if (mockRpcEnabled) {
|
||||
console.log('non-live test skipped');
|
||||
return;
|
||||
@ -24,12 +23,12 @@ test('load noop program', async () => {
|
||||
|
||||
const connection = new Connection(url);
|
||||
const from = await newAccountWithTokens(connection);
|
||||
|
||||
const noopProgramId = await NativeLoader.load(connection, from, 'noop');
|
||||
const noopTransaction = new Transaction().add({
|
||||
const programId = await NativeLoader.load(connection, from, 'noop');
|
||||
const transaction = new Transaction().add({
|
||||
keys: [from.publicKey],
|
||||
programId: noopProgramId,
|
||||
programId,
|
||||
});
|
||||
await expect(sendAndConfirmTransaction(connection, from, noopTransaction)).resolves.toBeUndefined();
|
||||
|
||||
await sendAndConfirmTransaction(connection, from, transaction);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user