mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
test: add integration test for #221
This commit is contained in:
parent
7c4a5a505f
commit
c8faa3e7d2
@ -0,0 +1,32 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
}: (dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = ./.;
|
||||
packageOverrides = {
|
||||
test = {
|
||||
"check-linked-bin-version" = {
|
||||
postInstall = ''
|
||||
npm run get-version
|
||||
VERSION=$(cat VERSION)
|
||||
echo "$VERSION"
|
||||
|
||||
if [ "$VERSION" = "2.8.0" ]; then
|
||||
echo "correct version installed - direct dependency"
|
||||
else
|
||||
echo "wrong version installed - transitive dependency"
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "test",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"get-version": "svgo --version > VERSION"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svgo": "2.8.0",
|
||||
"cssnano": "4.1.10"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user