Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitrov-d committed Jan 19, 2024
1 parent e0c10b8 commit 9d40196
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 4 additions & 1 deletion packages/sdk/src/tests/hosting.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from 'path';
import { Hosting } from '../modules/hosting/hosting';
import { DeployToEnvironment } from '../types/hosting';
import { DeployToEnvironment, DeploymentStatus } from '../types/hosting';
import { getConfig, getWebsiteUUID } from './helpers/helper';
import { HostingWebsite } from '../modules/hosting/hosting-website';
import * as fs from 'fs';
Expand Down Expand Up @@ -37,6 +37,9 @@ describe('Hosting tests', () => {
const deployment = await website.deploy(DeployToEnvironment.TO_STAGING);
expect(deployment.environment).toEqual(DeployToEnvironment.TO_STAGING);
deploymentUuid = deployment.uuid;

await website.get();
expect(website.lastDeploymentStatus).toEqual(DeploymentStatus.INITIATED);
});

test.skip('upload files from buffer', async () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/sdk/src/tests/identity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ describe('Identity Module tests', () => {
'3rJriA6MiYj7oFXv5hgxvSuacenm8fk76Kb5TEEHcWWQVvii',
);
expect(subsocial.content.name).toBe('dev only');
expect(subsocial.content.interests).toContain('crypto');
expect(subsocial.content.summary).toBeDefined();
expect(subsocial.content.about).toBeDefined();

const { polkadot } = await identity.getWalletIdentity(
'5HqHQDGcHqSQELAyr5PbJNAcQJew4vsoNCf5kkSpXcUGMtCK',
Expand Down
12 changes: 9 additions & 3 deletions packages/sdk/src/tests/nft.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ describe('Nft tests', () => {
const collection = await nft.create({
chain: EvmChain.MOONBASE,
collectionType: CollectionType.GENERIC,
name: 'created from sdk tests',
symbol: 'cfst',
name: 'sdk test',
description: 'created from sdk tests',
symbol: 'sdkt',
royaltiesFees: 0,
royaltiesAddress: '0x0000000000000000000000000000000000000000',
baseUri: 'https://test.com/metadata/',
Expand All @@ -36,6 +37,11 @@ describe('Nft tests', () => {
drop: false,
});
expect(collection.uuid).toBeDefined();
expect(collection.contractAddress).toBeDefined();
expect(collection.symbol).toEqual('sdkt');
expect(collection.name).toEqual('sdk test');
expect(collection.description).toEqual('created from sdk tests');

collectionUuid = collection.uuid;
});

Expand All @@ -56,7 +62,7 @@ describe('Nft tests', () => {
test('get nft collection details', async () => {
const collection = await nft.collection(collectionUuid).get();
console.log(collection);
expect(collection.name).toBe('created from sdk tests');
expect(collection.name).toBe('sdk test');
});

test('should fail nest minting for collection that is not nestable if collection populated', async () => {
Expand Down

0 comments on commit 9d40196

Please sign in to comment.