Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
2 years ago
|
// @flow strict-local
|
||
|
|
||
|
import assert from 'assert';
|
||
|
import {Asset, MutableAsset} from '../src/public/Asset';
|
||
|
import UncommittedAsset from '../src/UncommittedAsset';
|
||
|
import {createAsset as _createAsset} from '../src/assetUtils';
|
||
|
import {createEnvironment} from '../src/Environment';
|
||
|
import {DEFAULT_OPTIONS} from './test-utils';
|
||
|
import {toProjectPath} from '../src/projectPath';
|
||
|
|
||
|
function createAsset(opts) {
|
||
|
return _createAsset('/', opts);
|
||
|
}
|
||
|
|
||
|
describe('Public Asset', () => {
|
||
|
let internalAsset;
|
||
|
beforeEach(() => {
|
||
|
internalAsset = new UncommittedAsset({
|
||
|
options: DEFAULT_OPTIONS,
|
||
|
value: createAsset({
|
||
|
filePath: toProjectPath('/', '/does/not/exist'),
|
||
|
type: 'js',
|
||
|
env: createEnvironment({}),
|
||
|
isSource: true,
|
||
|
stats: {size: 0, time: 0},
|
||
|
}),
|
||
|
});
|
||
|
});
|
||
|
|
||
|
it('returns the same public Asset given an internal asset', () => {
|
||
|
assert.equal(new Asset(internalAsset), new Asset(internalAsset));
|
||
|
});
|
||
|
|
||
|
it('returns the same public MutableAsset given an internal asset', () => {
|
||
|
assert.equal(
|
||
|
new MutableAsset(internalAsset),
|
||
|
new MutableAsset(internalAsset),
|
||
|
);
|
||
|
});
|
||
|
});
|