This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +30
-5
lines changed Expand file tree Collapse file tree 4 files changed +30
-5
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ module . exports = {
4
+ karma : {
5
+ files : [ {
6
+ pattern : 'node_modules/interface-ipfs-core/test/fixtures/**/*' ,
7
+ watched : false ,
8
+ served : true ,
9
+ included : false
10
+ } ]
11
+ }
12
+ }
Original file line number Diff line number Diff line change @@ -9,7 +9,12 @@ const loadFixture = require('aegir/fixtures')
9
9
10
10
const FactoryClient = require ( '../factory/factory-client' )
11
11
12
- const testfile = loadFixture ( __dirname , '../fixtures/testfile.txt' )
12
+ let testfile
13
+ if ( isNode ) {
14
+ testfile = loadFixture ( __dirname , '../fixtures/testfile.txt' )
15
+ } else {
16
+ testfile = loadFixture ( __dirname , 'fixtures/testfile.txt' )
17
+ }
13
18
14
19
// add, cat, get and ls tests from interface-ipfs-core
15
20
let fc
Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ const path = require('path')
13
13
const loadFixture = require ( 'aegir/fixtures' )
14
14
const FactoryClient = require ( '../factory/factory-client' )
15
15
16
- const testfile = loadFixture ( __dirname , '../fixtures/testfile.txt' )
17
-
16
+ let testfile
18
17
let testfileBig
19
18
let tfbPath
20
19
if ( isNode ) {
21
- tfbPath = path . join ( __dirname , '/ ../fixtures/15mb.random' )
20
+ tfbPath = path . join ( __dirname , '../fixtures/15mb.random' )
22
21
testfileBig = fs . createReadStream ( tfbPath , { bufferSize : 128 } )
22
+ testfile = loadFixture ( __dirname , '../fixtures/testfile.txt' )
23
+ } else {
24
+ testfile = loadFixture ( __dirname , 'fixtures/testfile.txt' )
23
25
}
24
26
25
27
describe ( '.get' , ( ) => {
Original file line number Diff line number Diff line change 3
3
'use strict'
4
4
5
5
const expect = require ( 'chai' ) . expect
6
+ const isNode = require ( 'detect-node' )
6
7
const loadFixture = require ( 'aegir/fixtures' )
7
8
8
- const testfile = loadFixture ( __dirname , '../fixtures/testfile.txt' )
9
+ let testfile
10
+ if ( isNode ) {
11
+ testfile = loadFixture ( __dirname , '../fixtures/testfile.txt' )
12
+ } else {
13
+ testfile = loadFixture ( __dirname , 'fixtures/testfile.txt' )
14
+ }
9
15
10
16
describe ( '.name' , ( ) => {
11
17
let name
You can’t perform that action at this time.
0 commit comments