diff --git a/__tests__/buildx.test.ts b/__tests__/buildx.test.ts deleted file mode 100644 index f72bd45..0000000 --- a/__tests__/buildx.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import fs = require('fs'); -import * as buildx from '../src/buildx'; -import * as path from 'path'; -import * as os from 'os'; - -const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'setup-buildx-')); - -describe('buildx', () => { - it('is available', async () => { - expect(await buildx.isAvailable()).toBe(true); - }); - - it('count builders', async () => { - const countBuilders = await buildx.countBuilders(); - console.log(`countBuilders: ${countBuilders}`); - expect(countBuilders).toBeGreaterThan(0); - }); - - it('platforms', async () => { - const platforms = await buildx.platforms(); - console.log(`platforms: ${platforms}`); - expect(platforms).not.toBeUndefined(); - expect(platforms).not.toEqual(''); - }); - - it('acquires v0.2.2 version of buildx', async () => { - const buildxBin = await buildx.install('v0.2.2', tmpDir); - console.log(buildxBin); - expect(fs.existsSync(buildxBin)).toBe(true); - }, 100000); - - it('acquires latest version of buildx', async () => { - const buildxBin = await buildx.install('latest', tmpDir); - console.log(buildxBin); - expect(fs.existsSync(buildxBin)).toBe(true); - }, 100000); -}); diff --git a/__tests__/github.test.ts b/__tests__/github.test.ts deleted file mode 100644 index c87f0d6..0000000 --- a/__tests__/github.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as github from '../src/github'; - -describe('github', () => { - it('returns latest buildx GitHub release', async () => { - const release = await github.getRelease('latest'); - console.log(release); - expect(release).not.toBeNull(); - expect(release?.tag_name).not.toEqual(''); - }); - - it('returns v0.2.2 buildx GitHub release', async () => { - const release = await github.getRelease('v0.2.2'); - console.log(release); - expect(release).not.toBeNull(); - expect(release?.tag_name).toEqual('v0.2.2'); - }); -});